This question already has an answer here:
My current program only support landscape orientation.
In iOS 6, it crash on UIPopoverController
.
'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
I enable all orientation for project , it's working well. However, I need to change a lot for all of the views to only support landscape.
Is there other easy way to fix , UIOrientation
in UIPopoverController
?
Try adding the following to your
UIApplicationDelegate
:You can still set your supported interface orientations in your
Info.plist
file and by returning a mask in each view controller'ssupportedInterfaceOrientations:
method.Use Above Code, this worked for me.
New a subclass of UIImagePickerController and add this codes:
Use it like this:
Who knows a better way please tell me.
Thy this link. You have to set your application to support all orientations at the start. Do the change in app delegate.