views:

51

answers:

1

I have two different views (portrait and landscape) for each screen (home, user info, etc).

The difference between portrait and landscape views is enough to have each one into a different view and view controller because it's not only a relocation and resizing of controls.

To perform the switching between the two views I have a container view controller with landscapeView_ and portraitView_ properties and into

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

I do the switching.

This behavior is inherited from iPhone programming but now, in iPad, is this approach correct or it's another way to do the switching?

+2  A: 

I'm fairly sure that's the best way to do it.

You probably do this, but I would make sure you support all four orientations - they're sticklers for multiple orientations on the iPad.

Another place to make sure everything is kosher is in your Info.plist file - adding some keys like "Initial interface orientation", "Supported interface orientations", and/or "Supported Interface Orientations (iPad)" or "... (iPhone)" can add some clarity, i.e. when you submit.

Luke
Just a side note: they **recommend** all 4 orientations, but you only have to support two (either portrait up/down or landscape left/right) to get approved.
iWasRobbed
You're right - what I said was misleading. I just meant that if he does landscape left and portrait only, for example, they're likely to be fussy.
Luke
Thanks Luke. I'll look the Plist properties to control more the behavior.
Espuz