2017-10-19 114 views
1

我开始在本周迅速编程终止和我试图让我的应用程序简单的导航栏。这不是我第一次遇到这个错误,也不知道可能会丢失什么。如果我没有记错我勾一切从用户界面代码correctrly,但输出说:线程1:信号SIGABRT的libC++ abi.dylib:与类型NSException(LLDB)的未捕获的异常

libc++abi.dylib: terminating with uncaught exception of type NSException (lldb) 

什么可以是错误的?由于

import UIKit 

class ViewController: UIViewController { 
var t = Timer() 
@IBAction func hi(_ sender: Any) { 
    print("Camera button pressed") 
    t.invalidate() 
} 

func processTimer() { 
    print("1 second has passed") 
} 
override func viewDidLoad() { 
    super.viewDidLoad() 


    t = Timer.scheduledTimer(timeInterval: 1, target: self, selector: Selector(("processTimer")), userInfo: nil, repeats: true) 
    // 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. 
} 

}

回答

2

问题是与链接到许多IBActions的minus10Button - 其中一些不存在。因此,右键单击Interface Builder中的minus10Button,然后删除旧的和不相关的链接,解决问题。

+0

改变了它,但仍然没有工作,全码:https://pastebin.com/4bFR2bvM – Marci

+0

可以共享完整的错误文本? – Zee

+0

https://pastebin.com/taMssZHT – Marci

相关问题