出於某種原因,當達到performSegueWithIdentifier行時出現此錯誤。Swift:exc_breakpoint(code = exc_arm_breakpoint subcode = 0xdefe)onForForSegue
我有這樣的代碼:
if let storedAPIKeychain: AnyObject = dictionary.objectForKey("api_key") {
println(storedAPIKeychain)
//This is the line that causes the problems.
performSegueWithIdentifier("skipBrandSegue", sender: self)
}
的的println()工作正常,並輸出正確的信息。
我試圖通過storedAPIKeychain與SEGUE一起:
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
if segue.identifier == "skipBrandSegue" {
// Create a new variable to store the instance of the next view controller
let destinationVC = segue.destinationViewController as brandsViewController
destinationVC.storedAPIKey = storedAPIKeychain!
}
}
而且我認爲他可能會出現的問題。然而,當我將該行更改爲:
destinationVC.storedAPIKey = "someAPIplaceholder"
我也遇到同樣的錯誤。
有人可以告訴我這個錯誤是什麼以及如何解決它。謝謝。
編輯:錯誤的屏幕截圖:
謝謝,我是Swift/Xcode的新手,我忘了添加Segue。 – DannieCoderBoi 2015-02-08 05:40:25