我有启动画面的代码,然后会进入主登录画面。但它没有切换,它给我一个 Thread 1 Breakpoint 1.2
错误。
代码如下:
func switchScreen() {
let mainStoryboard = UIStoryboard(name: "Storyboard", bundle: NSBundle.mainBundle())
let vc : UIViewController = mainStoryboard.instantiateViewControllerWithIdentifier("vcMainLogin") as UIViewController // this is the line giving the error
self.presentViewController(vc, animated: true, completion: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: "switchScreen", userInfo: nil, repeats: false)
// Do any additional setup after loading the view.
}
我已经将 Storyboard ID 设置为与类名相同,但它仍然给我这个,并且在输出中:仅 (lldb)
。
最佳答案
您可能在没有注意的情况下不小心设置了断点。您必须禁用所有应用程序断点。
您可以通过单击禁用所有断点, -> 调试菜单 -> 停用断点
关于ios - 线程 1 断点 1.2 - Swift Xcode 6 beta 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24369475/