since iOS6 i have big problems with the rotation. I implemented all the new rotation methods (shouldAutorotate, preferredInterfaceOrientationForPresentation, supportedInterfaceOrientation), but all views are still rotating. The funny thing is that the views are keeping their sizes and the rest of the Window (in Landscape) is black.
Thats the way i implement it, is there anything wrong?
#pragma mark -
#pragma mark - InterfaceOrientation iOS 5
//Deprecated in iOS 6
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
#pragma mark -
#pragma mark - InterfaceOrientation iOS 6
- (BOOL)shouldAutorotate{
return NO;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
return UIInterfaceOrientationPortrait;
}
- (NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskPortraitUpsideDown;
}
Thanks for your help folks.
UIInterfaceOrientationMaskPortrait
?Supported interface orientation
select only two supported interface. This will solve your problem :)