与最初的代码相比,唯一的更改是在ViewControl.swift
override func viewDidLoad() {
newMessage.hidden = true
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.
}
@IBOutlet weak var newMessage: UILabel!
@IBOutlet var newButton: UIButton!
@IBAction func newButtonAction(sender: UIButton) {
newMessage.hidden = false
}
}
但我得到了SIGABRT
错误于AppDelegate.swift on
class AppDelegate: UIResponder, UIApplicationDelegate {
这是一个Xcode 6.1错误或者我的代码有问题吗?
您的 xib/storyboard 中很可能出现了可疑的情况。检查连接以确保您的所有IBOutlets
and IBActions
已正确连接,并且不存在旧的、删除的或修改的变量留下的任何连接。
除此之外,如果没有更多信息,很难说。查看this https://stackoverflow.com/questions/8072135/how-to-track-down-cause-of-sigabrt and this https://stackoverflow.com/questions/7790993/sigabrt-with-no-error-message寻求更多帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)