As every iOS developer is now a days sturggling with autorotationg features changed with iOS6
launching with concerned to that i have one problem:
As my application supports UIInterfaceOrientationMaskPortrait
but for few view controllers i want to support all UIInterfaceOrientationMaskPortraitAll
i implemented it as following :
in my rootviewcontrller that is in my case navigation contrller :
- (BOOL)shouldAutorotate
{
return self.topViewController.shouldAutorotate; //you are asking your current controller what it should do
}
in my viewcontrllers :
-(BOOL)shouldAutorotate
{
return //if view supports auto orientation then return yes else no
}
all is working well but 1 problem is... suppose my 2nd view supports all orientations and 1st view only supports only portrait then if I rotate 2 view and get back if i my current view orientation(view2) is landscape then view1 will also not rotate to its supported orientation.
so how to overcome from this problem please if any then solutions are welcome.