views:

68

answers:

1

I want set interfaceOrientation in one UIView as LandscapeLeft and Portrait in other UIView. How can I do this?

Or maybe change view to new, that designed for portrait on rotating iphone in this mode? how?

A: 

You can apply a transform to your views to rotate them the way you want them.

Example:

[aView setTransform:CGAffineTransformMakeRotation(-M_PI_2)]

Or are you asking how to swap views when the orientation changes? (Your question isn't phrased so clearly.) In that case in your view controller implement the method -willRotateToInterfaceOrientation:duration: and use -addSubview: and -removeFromSuperview to show the view you'd like to use for the given orientation.

Johan Kool
sorry for my english! Maybe I will use willRotateToInterfaceOrientation:duration but this is not what I meant. I want to set portrait orientation mode to one view and landscape orientation mode to another views.
BUDDAx2
There is no such thing as an orientation mode for a view. The device has an orientation, not the view. It is however possible, as I gave in my answer as the first option, to apply a transform to a view to draw it at a different angle (and/or scale and/or translation) than other views. That'd be something like `[aView setTransform:CGAffineTransformMakeRotation(-M_PI_2)]`
Johan Kool