views:

123

answers:

2

Hi everyone! I'm working on an app for the iPad and am a little over my head with one issue. Is it possible to build an app for iPad that uses a function to control which interface layout is displayed? Something like "if these parameters are met, use XIB file "a" else use XIB file "b". I know that's not in any kind of legitimate format, but you get the idea.

If this is possible, does anyone know of any tutorials on how to do it or sample code I could look at?

Thanks!

A: 

I think you want to show two xibs with same content but different orientations. If this is the case you should avoid doing this rather change the frames of your content when the orientation changes.

Madhup
A: 

Rather than draw a connection from your app delegate to the main view controller in your xib, instantiate the view controller in applicationDidFinishLaunching. [UIViewController initWithNibName:bundle:] allows you to specify which xib to use.

alltom