开发者

How to make a UIView autosize to full screen when switching orientation

Do I nee开发者_开发问答d to write code to make a UIView fill up the window area when switching orientation? Is there a simple setting?


If the view initially takes up the whole screen, and the app is set to autorotate, all you should have to do is set the autoresizing mask on the view to resize width and height:

view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

Edit: see my comment below for how to do this in IB

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜