iosswiftuilabelexc-bad-instruction

EXC_BAD_INSTRUCTION when i set UILabel title in Swift 2.0


I want to change the title of an UILabel, but I receive an EXC_BAD_INSTRUCTION error.
My label was correctly connected to the storyboard and I don't understand why i have an error. Could anybody please point where I am wrong? Thank you for your help.

There is my code :

class ViewController: UIViewController {
    @IBOutlet weak var numberLabel: UILabel!
    override func viewDidLoad() {
        super.viewDidLoad()
        self.numberLabel.text = "qwerty" // Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP,subcode0x0)
    }
}

Solution

  • Ok, I resolved my problem.
    Strangely, if I reinstall Xcode, It's work.
    Thanks for your answers.