开发者

How to set the autoresize property to change according to orientation in iPhone?

开发者 https://www.devze.com 2022-12-30 12:00 出处:网络
I have an application created with a root class to be UIViewController class. I have placed one button on its view with frame size fixed in the view and have also set:

I have an application created with a root class to be UIViewController class. I have placed one button on its view with frame size fixed in the view and have also set:

    -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
        return YES;
}

Now when i rotate the button remains in the same place except it is turned up. If i set 开发者_开发知识库the autoresizing will the UIButton appears in the proper position. If so how to set the autoresizing??


Why don't you start here with moving and resizing objects

http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/IB_UserGuide/Layout/Layout.html#//apple_ref/doc/uid/TP40005344-CH19-SW1

0

精彩评论

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