Search code examples
sdklayeruiinterfaceorientationios8presentviewcontroller

"presentViewController" and Orientation problems between iOS 7 and iOS 8


In iOS 6 or 7 sdk, myV Setting I can be effectively "presentViewController" and handle the presentedViewcontroller's Orientation.

I try to use Landscape VC to present Portrait VC, and It's Work at iOS sdk 6-7.

[[self viewController] presentViewController:dotWebView animated:YES completion:nil];

but when I turn on iOS 8 simulator and build my project, the presented VC can not handle it's own Oritation any more. It's always Landscape Ori and never come back.

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeLeft];

or

[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];

still not working effectively, because the keyboard only eat [[UIDevice currentDevice] orientation] , and I have no way to change it by coding.

I have ever use view.layer.transfrom to change the angle (M_PI/2) but only Self-satisfaction.

I still can not turn it on.... If anyone knew about the possibility of teaching?


Solution

  • This morning I download Xcode 6 Beta4 and It's no problem@@