Different xib file when rotated Xcode
Can I use a diffrent .xib file开发者_C百科 when the iPad is rotated into landscape mode? if it is possible how would I code that, I'm a bit new to Xcode :P
If it was rotated before you need to create the view, then by all means, instantiate the view using a different xib file. If the view is already created, you can remove it, instantiate a new one using the landscape xib file, and add it again. This wouldn't be recommended though. :P
It is better to layout your view with a xib file that will adjust on rotation/resize, either by setting the automatic adjustment options or by manually repositioning/adjusting the elements inside your view after an orientation change.
精彩评论