2017-10-19 43 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

相關問題