开发者

Animating UIView center property not working on willRotateToInterfaceOrientation

I'm animating a subview in the UIViewController's willRotateToInterfaceOrientation. First, I was setting its frame to a new position and it was working fine. Since I just animate the positioning I tried to animate the center property instead. As soon as I do it, the animations do not work anymore.

I'm using UIView's animateWithDuration and when checking the completion block, the finished parameter is always NO. Animating the center property on other events like a button click works fine.

Might it be that the rotation algori开发者_高级运维thm iOS uses to reposition a view's subviews also touches the center property and cancel's my animation?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜