In my application i got 2 UIViewControllers
, first is root controller in UINavigationController
and second is called by first one by pushing to UINavigationController's
stack.
So first view should be only in portrait orientation, when second should support all orientations.
I wrote in first this code:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
return toInterfaceOrientation == UIInterfaceOrientationPortrait;
}
But it still rotating to all orientations. Why?