开始/结束外观转换的呼叫不平衡 [英] Unbalanced calls to begin/end appearance transitions

查看:312
本文介绍了开始/结束外观转换的呼叫不平衡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从我的 Viewcontroller 中显示 QLPreviewviewcontrolelr 时,运行时警告在日志中显示为

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

用于开始/结束外观转换的不平衡呼叫.

任何人都可以向我建议解决方案.

Can anyone please suggest me the solution to fix.

推荐答案

这显然是Apple错误.您可以将预览控制器包装到导航控制器中,然后模态显示此导航控制器.这似乎工作正常.只有这样,您才需要手动将其消除.

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(_:))) })

这篇关于开始/结束外观转换的呼叫不平衡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆