开发者

iPad rotation - Image Positioning

开发者 https://www.devze.com 2023-01-14 23:25 出处:网络
So I have an app that has a login screen with an image and text bars.When I rotate the device, the components rotate, but they are not centered anymore.They just pivot in plac开发者_StackOverflow社区e

So I have an app that has a login screen with an image and text bars. When I rotate the device, the components rotate, but they are not centered anymore. They just pivot in plac开发者_StackOverflow社区e. I need them to reposition themselves to the center of the landscape view as well. Can anyone point me to or have an example of how to handle a rotation like this? Any help would be appreciated. Thanks!


You need to set the autoresizingMask on things that get rotated. If you built your interface with Interface Builder, you can do that on the layout tab of the property inspector. You can even preview the effect by clicking the arrow on the right side of the title bar of your view.

0

精彩评论

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