UIViewController动画停止工作
问题说明
我的应用程序在iOS6中运行良好,但是在未指定的即将推出的iOS版本中,由于NDA原因我无法命名,所有 UIViewController
过渡动画都停止工作。新视图立即就位。我不确定这个未指定的iOS未来版本是否是原因,因为我在iOS6中偶尔会看到这种情况。
My app runs fine in iOS6, but in an unspecified upcoming version of iOS that I cannot name for NDA reasons, all UIViewController
transition animations stop working. New views just pop into place instantly. I am not sure if this unspecified future version of iOS is the cause, as I've seen this happen occasionally in iOS6.
有时动画开始工作一段时间然后不久后停止,让我觉得这是某种内存警告问题,但我的应用程序在大多数情况下使用相当合理的~125MB RAM。任何人都可以提供任何建议或事情来调查吗?
Sometimes animations start working for a while and then stop shortly after, making me think it's some sort of memory warning issue, but my app is using a fairly reasonable ~125MB of RAM at most times. Can anyone offer any advice or things to investigate?
正确答案
所描述的行为一直存在:如果你在背景线程上工作,然后调用和UIKit方法,然后通常会以一种奇怪的方式延迟更新。
The described behavior has always existed: if you do work on background threads and then call and UIKit methods then more often than not the update will be delayed in a weird way.
因此你应该总是 dispatch_async
进入主队列以更新UI。
Because of this you should always dispatch_async
onto the main queue to update the UI.
这些错误很难捕获,因为它们并不总是可预测地发生。
Those bugs are very hard to catch since they do not always occur predictably.
为了捕获它们,我构建了一个方法,它调用一些UIKit方法来检查它们是否在主线程上被调用。这样,只要忘记发送回主队列,就可以停止符号断点。
To catch them I built a method that swizzles some UIKit methods to check if they are called on the main thread. This allows you to stop on a symbolic breakpoint, whenever you have forgotten to dispatch back onto main queue.
https://github.com/Cocoanetics/DTFoundation/blob/develop/Core/Source/iOS/Debug/UIView+DTDebug。 m
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /reply/detail/tanhcbjbea
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
检查邮件是否发送成功
it1352 07-25 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
Android微调工具-删除当前选择
it1352 06-20 -
希伯来语的空格句子标记化错误
it1352 06-22 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20