My app only supports landscape orientations via the supportedInterfaceOrientation
properties.
Using an iOS prior to iOS 6, my app can successfully load an instance of UIImagePickerController
via presentViewController:animated:completion:
even though the UIImagePickerController
itself only supports portrait orientation.
The image picker simply presented itself sideways to the user. The user rotated the phone, picked their image, and then rotated back to landscape.
Under iOS 6.0, calling presentViewController:animated:completion:
with the UIImagePickerController
instance crashes the app. I can prevent the crash by adding portrait options to my supportedInterfaceOrientation
properties.
However, operating in portrait really does not make sense for my app. I had thought I could use shouldAutorotateToInterfaceOrientation
to allow the app to "support portrait" but only be allowed to rotate to portrait in this one view. But now that method is deprecated, and I can't use the same technique with shouldAutorotate.
Does anyone have any ideas how I can get around this issue under iOS 6.0?
question from:https://stackoverflow.com/questions/12522491/crash-on-presenting-uiimagepickercontroller-under-ios-6-0