开发者

How can I stop the UIViewController auto-rotation animation from clipping my view?

In my iOS app I have a view controller in a UINavigationController. The navigation controller's nav bar and toolbar are both showing.

The view controller just has a simple background image as the view. The view controller can be rotated to any orientation. When the willAnimateRotationToInterfaceOrientation:duration: method is called, the view controller applies a transform to the view so that it appears to remain in the exact same position it was originally, with the same orientation. The toolbar and the nav bar, however, rotate to the new orientation.

So far so good. On ro开发者_如何学运维tations, the nav bar and toolbars rotate, the view appears to remain in the same position. The only problem is that during the rotation, the corners of the view are clipped off. It looks like the view controller is clipping the contents of the screen to a rectangle that animates from the original screen orientation to the new screen orientation.

Is there any way to stop it from clipping like that?


Try making your background image the size of the screen. So if its an iPhone make it 480 x 480.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜