简体   繁体   中英

SIGABRT runtime error in xcode 6.1 (Swift)

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?

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.

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).

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM