xcode 6.1中的SIGABRT运行时错误(Swift)

最初对代码进行的唯一更改是在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 } } 

但我在AppDelegate.swift上遇到SIGABRT错误

 class AppDelegate: UIResponder, UIApplicationDelegate { 

这是Xcode 6.1错误还是我的代码有问题?

在你的xib / storyboard中很可能会发生一些可疑的事情。 检查连接以确保所有IBOutletsIBActions都已正确连接,并且旧的,已删除或已修改的变量没有任何连接。

除此之外,如果没有更多信息,很难说。 看看这个和这个以获得更多帮助。

似乎Xcode在exception点没有中断 – 查看错误控制台以获取更多信息。 查看照片以查看要选择的窗口(它是右侧的蓝色图标)。

在此处输入图像描述