我想從一個viewController跳轉到另一個。我一直在使用performSegueWithIdentifier
,它適用於所有viewController。每次該應用程序試圖執行該segue它打印此錯誤:使用performSegueWithIdentifier()向標識符添加撇號
2016-08-21 15:04:29.170 onboarding[44226:2490189] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver() has no segue with identifier 'gogo''
我在segue中的標識符是「gogo」。同樣在我的代碼中,我使用:
self.performSegueWithIdentifier("gogo", sender: self)
如果仔細觀察錯誤消息,我注意到Xcode向標識符添加了一個撇號。打印'gogo''而不是'gogo'。這是爲什麼發生?
嘗試xcode→產品→清潔 – Dasem