Swift 线程1:信号SIGABRT libc++;abi.dylib:以NSException(lldb)类型的未捕获异常终止

Swift 线程1:信号SIGABRT libc++;abi.dylib:以NSException(lldb)类型的未捕获异常终止,swift,Swift,本周我开始在swift上编程,并试图在我的应用程序中制作一个简单的导航栏。这不是我第一次遇到这个错误,也不知道会遗漏什么。如果我没有弄错的话,我会正确地钩住从ui到代码的所有内容,但输出显示: libc++abi.dylib: terminating with uncaught exception of type NSException (lldb) 可能是什么错误?谢谢 import UIKit class ViewController: UIViewController { var t

本周我开始在swift上编程,并试图在我的应用程序中制作一个简单的导航栏。这不是我第一次遇到这个错误,也不知道会遗漏什么。如果我没有弄错的话,我会正确地钩住从ui到代码的所有内容,但输出显示:

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

}

问题在于链接到多个iAction的
minus 10按钮
,其中一些iAction不存在。因此,右键单击Interface Builder中的
minus 10按钮
,删除了旧的和不相关的链接,解决了问题。

更改了它,但仍然不起作用,完整代码:编辑了答案,请尝试。非常感谢您的帮助,我非常感谢!这是我的荣幸!