ios5 中几乎所有东西都是动画的
我正在开发一个使用 Xcode 4.1 构建并与 iOS 4.0 链接的应用程序。今天我已经开始在 iOS5 上进行测试,以便在新操作系统发布时做好准备。
我们有一个有趣的问题,几乎每个 UIView 子类在重绘时都会产生动画。例如,每次用户滚动时,作为表视图的节标题返回的视图都会动画化。但实际上几乎所有 UIView 更新都是动画的。屏幕上的效果非常令人迷惑。
我找不到关于这个问题的任何内容。但我一定错过了一些重大的改变或者做了一些非常错误的事情。
有人遇到类似的问题吗?
I am working on an App built with Xcode 4.1 and linked against iOS 4.0. Today I have started testing on iOS5 to get it ready by the time the new OS launches.
We have an interesting issue where almost every UIView subclass animates when they are redrawn. The views returned as section headers of a table view are animated every time the user scrolls for instance. But practically almost any UIView update is animated. The effect on the screen is very disorienting.
I can't find anything on this issue. But I must be missing out on some big changes or doing something very wrong.
Anybody experiencing similar issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我对 iOS 5 的了解,这不是正常行为。
听起来您正在对 UIView 动画块内的 TableView 进行一些调用,因此 UITableView 所做的任何调用(例如 LayoutSubviews)也在该动画块中。另一种可能性是您忘记正确提交动画,因此所有 UIView 更改也都包含在内。
UIView 动画及其运行方式发生了一些变化。有趣的是,我在使用动画时遇到了一些麻烦,这些动画过去是按顺序运行的。所以,也许这是您的代码中以前从未注意到的错误。
Based on what I've seen of iOS 5 this isn't normal behavior.
It sounds like you are wrapping some call to that TableView inside of a UIView animation block, so any call the UITableView makes (Such as LayoutSubviews) is also in that animation block. Another possibility is that you forgot to properly commit an animation, so all UIView changes past that are also included.
There have been some changes to UIView animations and the way they are run. Just anecdotally, I've had some trouble with Animations that used to run sequentially running on top of each other. So, maybe this is a bug in your code that was just never noticeable before.