import UIKit
class ViewController: UIViewController {
@IBOutlet var nLabel: UILabel
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func numero(button : UIButton){
if nLabel.text == "0" {
nLable.text = button.titleLabel.text
}else{
nLable.text = nLable + button.titleLabel.text
}
}
}
Dopo che scrivo questo "@IBOutlet var nLabel: UILabel" mi dice che la classe non è inizializzata! Grazie mille per l'aiuto! Non so se fa la differenza, ma uso Xcode versione 6.1