开发者

Different xib file when rotated Xcode

开发者 https://www.devze.com 2023-02-17 01:05 出处:网络
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 :PIf it was rotated before you need to create

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.

0

精彩评论

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

关注公众号