Unbalanced calls to begin/end appearance transitions

好久不见. 提交于 2019-12-25 07:36:54

问题


When I am presenting a QLPreviewviewcontrolelr from my Viewcontroller, the runtime warning that appears in the log as

Unbalanced calls to begin/end appearance transitions for .

Can anyone please suggest me the solution to fix.


回答1:


Did you delete main.m file?If you didn't have an application begin,you will get this.




回答2:


This is clearly Apple bug. You can wrap preview controller into navigation controller and then present this navigation controller modally. This seems to work fine. Only then you'll have to dismiss it manually.

let picker = QLPreviewController()
picker.dataSource = self
picker.delegate = self

let navcon = UINavigationController(rootViewController: picker)

presentViewController(navcon, animated: true, completion: { 
           picker.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Done, target: self, action: #selector(MyViewController.dismiss(_:))) })


来源:https://stackoverflow.com/questions/33430440/unbalanced-calls-to-begin-end-appearance-transitions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!