ios - UITraitCollection remains same for iPhone / iPad -
in ios 8.3, present view controller following code:
uinavigationcontroller *nav = [[uinavigationcontroller alloc] initwithrootviewcontroller:controller]; nav.modalpresentationstyle = uimodalpresentationformsheet; nav.modaltransitionstyle = uimodaltransitionstylecoververtical; [self presentviewcontroller:nav animated:yes completion:nil];
upon presentation in ipad simulator, check uitraitcollection property of view (po self.traitcollection
) in viewdidload()
method , here get:
<_uitraitnamehorizontalsizeclass = regular, _uitraitnameverticalsizeclass = regular>
i switch simulator ipad iphone (5s or 6) , still regular horizontal size class trait in view. iphones should have compact horizontal size class trait.
since horizontal size class wrong, wrong size class design loaded storyboard. ideas why framework providing wrong size class?
Comments
Post a Comment