objective c - How to change the device orientation programmatically in iOS 6 -
in ios 5 change device orientation programmatically so:
[[uidevice currentdevice] setorientation:uiinterfaceorientationlandscaperight];
but in ios 6 setorientation
deprecated, how may change device orientation programmatically in ios 6?
here "five cents", tested on ios7 arc
[[uidevice currentdevice] setvalue: [nsnumber numberwithinteger: uiinterfaceorientationportrait] forkey:@"orientation"];
this doesnt generate "leak" warning performselector will.
uialertview - code, when open uialertview during view(will/did)appear notice view in portrait (apple, really?) wasn't able force view reorient found if put slight delay before opening uialertview view has time change orientation.
note i'm releasing app week commencing 12/09/2014 , update post if pass or fail.
Comments
Post a Comment