views:

71

answers:

1

I have an UISplitViewController base project.

I want to have a different detail View depending the orientation of the app.

Exemple :

In landscape when I select a row in the TableView, I want the detailView to be an UIWebView.
But in portrait I want the detail view to be a complex custom view.

Is it possible ?

Thanks.

A: 

See the MultipleDetailView sample project for the basics.

The easiest way to shift views based on orientation is to use a navigation control to push an pop the each orientations custom views in response to changes to orientation. Put the nav code in willRotateToInterfaceOrientation:duration: and the view controllers will pop their views and push the other when the device rotates.

I would say, however, the using two different types of views for the same detail but different orientation will most likely confuse the user. That is not what the interface grammar teaches them to expect. In every other app, it is the same basic view with the same info just adjusted for the change in display dimensions.

You might want to think twice about whether this is a good UI design before spending the time to implement it.

TechZen

related questions