I am only allowing Device Orientation portrait for UIViewControllers being viewed on iPhones through the following code:
- (BOOL)shouldAutorotate
{
NSString *device = [UIDevice currentDevice].model;
return [device rangeOfString:@"iPhone"].location != NSNotFound ? NO : YES;
}
This works fine - when I rotate my iPhone while looking at ViewController A, the view does not rotate. Similarly, when I rotate my iPhone while looking at ViewController B, the view does not rotate. However, when I rotate my iPhone while looking at ViewController A, tap a button that presents ViewController B modally, the show segue animation (Flip Horizontal) is landscape, and ViewController B appears in landscape.
How can I force the segue to be portrait as well and not rotate ViewController B?