objective c - UIInterfaceOrientationUnknown for what purpose -
in ios 8 have added device orientation detection uiinterfaceorientationunknown
(check pre-release documentation here)
uiinterfaceorientationunknown
the orientation of device cannot determined.
available in ios 8.0 , later.
typedef enum : nsinteger { uiinterfaceorientationunknown = uideviceorientationunknown, uiinterfaceorientationportrait = uideviceorientationportrait, uiinterfaceorientationportraitupsidedown = uideviceorientationportraitupsidedown, uiinterfaceorientationlandscapeleft = uideviceorientationlandscaperight, uiinterfaceorientationlandscaperight = uideviceorientationlandscapeleft } uiinterfaceorientation;
the way see there 4 ways device possibly ever been portrait
, upsidedown
, landscaperight
, landscapeleft
. in circumstances ever have device orientation of unknown?
i have faced uiinterfaceorientationunknown
state when window creation performed before uiapplication
prepared , called applicationdidlaunch
on appdelegate.
btw, achieved swizzling magic inside typhoon di framework.
Comments
Post a Comment