SIGABRT runtime error in xcode 6.1 (Swift)

帅比萌擦擦* 提交于 2019-12-23 13:08:46

问题


The only change that have been made to the code from the initial have been made in 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
    }
}

yet I'm getting a SIGABRT error in AppDelegate.swift on

class AppDelegate: UIResponder, UIApplicationDelegate {

Is this an Xcode 6.1 error or is there something wrong with my code?


回答1:


There is most likely something fishy going on in you xib/storyboard. Check the connections to make sure all your IBOutlets and IBActions are connected correctly and that there aren't any connections left over from old, deleted or modified variables.

Other than that, it's hard to say without more information. Check out this and this for more help.




回答2:


Seems like Xcode doesn't break at the exception point - look into the error console for more information. See photo to see which window to select (it's the blue icon on the right).



来源:https://stackoverflow.com/questions/26540170/sigabrt-runtime-error-in-xcode-6-1-swift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!