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
精彩评论