In iOS 8.3, I present a view controller with the following code:
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:controller];
nav.modalPresentationStyle = UIModalPresentationFormSheet;
nav.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentViewController:nav animated:YES completion:nil];
Upon presentation in my iPad simulator, I check the UITraitCollection property of my view (po self.traitCollection
) in the viewDidLoad()
method and here is what I get:
<_UITraitNameHorizontalSizeClass = Regular,
_UITraitNameVerticalSizeClass = Regular>
I switch the simulator from iPad to iPhone (5s or 6) and I still get the Regular horizontal size class trait in my view. iPhones should have an Compact horizontal size class trait.
Since the horizontal size class is wrong, the wrong size class design is loaded from the storyboard. Any ideas why the framework is providing a wrong size class?