I have tried in Xcode7 for many times, but still follow the problem as below:
TapWar[10487:391936] *** Terminating app due to uncaught exception 'NSUnknownKeyException',
reason: '[<TapWar.ViewController 0x7f9848483220> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key buttomButtonAction.'
The codes are nothing special, just outlets and action for storyboards import UIKit
class ViewController: UIViewController {
@IBOutlet weak var topButton: UIButton!
@IBOutlet weak var buttomButton: UIButton!
@IBOutlet weak var topLabel: UILabel!
@IBOutlet weak var buttomLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
score = 0
topLabel.text = "\(score)"
buttomLabel.text = "\(score)"
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
//Button on top to tap
@IBAction func topButtonAction(sender: UIButton)
}
//Button under to tap
@IBAction func buttomButtonAction(sender: AnyObject) {
}
}
Did you check your IBOutlet or IBAction connection? That error usually cause name inconsistence.