当我解雇控制器时,我的应用程序有问题,使用lldb,我没有做任何错误,我在这里提供项目和示例代码:
我在此介绍:
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
var cont = storyboard?.instantiateViewControllerWithIdentifier("Detail") as! Detail
cont.link = indexPath.row
self.view.window?.rootViewController?.presentViewController(cont, animated: true, completion: nil)
}在这里驳回它:
@IBAction func disiss(sender: AnyObject) {
self.dismissViewControllerAnimated(true, completion: nil)
}我的项目在这里:https://yadi.sk/d/pSscby7ZicqSU
我认为这个问题发生时,试图打开和解散,打开和解散迅速!有时我只是打开它,然后解散,它就崩溃了!我正在iPhone 6上测试,我刚刚在模拟器iPhone 6上试过,它崩溃了。
发布于 2015-08-24 07:26:23
在ViewController.swift中
替换
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
}使用
override func viewDidLoad() {
super.viewDidLoad()
}https://stackoverflow.com/questions/32176105
复制相似问题