Hello guys!
Down there is my code which is called when the iPhone is rotated.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
switch (interfaceOrientation) {
case UIInterfaceOrientationPortrait:
// some action
return YES;
case UIInterfaceOrientationLandscapeLeft: {
// some action
return NO;
}
case UIInterfaceOrientationLandscapeRight: {
// some action
return NO;
}
default:
return NO;
break;
}
}
I thought this is enough, but then I spotted, that the
case UIInterfaceOrientationPortrait:
is never called. What can I do? Do I have to use the default? Maybe it isn't the best solution, or it is?