xcode 6.1 (Swift) 中的 SIGABRT 运行时错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26540170/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SIGABRT runtime error in xcode 6.1 (Swift)
提问by john lemer
The only change that have been made to the code from the initial have been made in ViewControl.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
}
}
yet I'm getting a SIGABRT
error in AppDelegate.swifton
但我得到一个SIGABRT
错误AppDelegate.swift上
class AppDelegate: UIResponder, UIApplicationDelegate {
Is this an Xcode 6.1error or is there something wrong with my code?
这是Xcode 6.1错误还是我的代码有问题?
回答by Hayley Guillou
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.
你的 xib/storyboard 很可能有一些可疑的东西。检查连接,以确保所有的IBOutlets
和IBActions
被正确连接,并且没有任何连接旧,删除或修改变量遗留下来的。
Other than that, it's hard to say without more information. Check out thisand thisfor more help.
回答by Zorayr
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).
似乎 Xcode 不会在异常点中断 - 查看错误控制台以获取更多信息。查看照片以查看要选择的窗口(右侧的蓝色图标)。