Hi,
In my application, i have used UITabbarController inside UINavigationController, when you click main it will landed to detail with landscape, instead of that, i need to change the orientation of my app. how should i get it?
Sri
Hi,
In my application, i have used UITabbarController inside UINavigationController, when you click main it will landed to detail with landscape, instead of that, i need to change the orientation of my app. how should i get it?
Sri
You can't force an orientation, that requires the use of a private API. What you need to do is implement the following method on your view controller and return yes for only the supported orientations. For example, if you support only the portrait orientation add this:
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
return ((orientation==UIInterfaceOrientationPortrait) || (orientation==UIInterfaceOrientationPortraitUpsideDown))
}
Also note that you have to override that method (copy&paste) in every view controller class of your hierarchy because of this.
Hope it helps, I'm not sure if that is what you asked for.