My app uses 2 UIWindows. The first shown has a TabBar controller with ViewControllers that only rotate to Portrait orientations. Up to here everything woks fine.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (UIInterfaceOrientationIsPortrait(interfaceOrientation));
}
On the other window I have a UIViewController that rotates to all orientations.
The problem is that when I show the second window
[secondWindow makeKeyAndVisible];
And then return to the first one
[firstWindow makeKeyAndVisible];
The statusbar rotates to all directions and the event shouldAutorotateToInterfaceOrientation is not fired. How can i solve the problem?