Lenny Magico
Lenny Magico

Reputation: 1203

Different xib file when rotated Xcode

Can I use a diffrent .xib file 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

Upvotes: 0

Views: 1018

Answers (1)

Altealice
Altealice

Reputation: 3572

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.

Upvotes: 4

Related Questions