ios - ipad app won't rotate in IOS6 -
i have uisplitviewcontroller ipad app. uses mainwindow.xib , subclassed rootview , detailview controllers. autorotates in ioses 5.1.
i know interface changed ios6. when add new rotation methods detail , rootview classes still not rotate.
my supportedinterfaceorientations method called, shouldautorotate never called.
does know how fix this?
(always learning no 1 can mess around badly programmer. apple.) gerry
from ios 6 release notes:
autorotation changing in ios 6. in ios 6,
shouldautorotatetointerfaceorientation:method ofuiviewcontrollerdeprecated. in place, should usesupportedinterfaceorientationsforwindow:,shouldautorotatemethods.more responsibility moving app , app delegate. now, ios containers (such
uinavigationcontroller) not consult children determine whether should autorotate. default, app , view controller’s supported interface orientations setuiinterfaceorientationmaskallipad idiom ,uiinterfaceorientationmaskallbutupsidedowniphone idiom.a view controller’s supported interface orientations can change on time—even app’s supported interface orientations can change on time. system asks top-most full-screen view controller (typically root view controller) supported interface orientations whenever device rotates or whenever view controller presented full-screen modal presentation style. moreover, supported orientations retrieved if view controller returns yes
shouldautorotatemethod. system intersects view controller’s supported orientations app’s supported orientations (as determined info.plist file or app delegate’sapplication:supportedinterfaceorientationsforwindow:method) determine whether rotate.the system determines whether orientation supported intersecting value returned app’s
supportedinterfaceorientationsforwindow:method value returnedsupportedinterfaceorientationsmethod of top-most full-screen controller.the
setstatusbarorientation:animated:method not deprecated outright. works ifsupportedinterfaceorientationsmethod of top-most full-screen view controller returns 0. makes caller responsible ensuring status bar orientation consistent.
i know that's mouthful might want check supported interface orientations sheet in project's settings:

Comments
Post a Comment