2017-11-24 11 views
0

Ich versuche, UIImagePickerController im Querformat für iPhone zu präsentieren, wie meine Anwendung nur Querformat unterstützt.Was funktioniert gut mit iOS 11. Aber wenn ich meine Anwendung in iOS 10.3.3 ausgeführt wird es Crash gleich Zeit mit Fehlern:Open UIImagePickerController in Landschaft

*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [PUUIAlbumListViewController shouldAutorotate] is returning YES' * First throw call stack:** 
+0

Subclass UIImagePickerController helfen und i "Unterstützung vonInterfaceOrientations" und "shouldAutorotate" -Methode –

Antwort

0

eine Erweiterung von UIImagePickerController erstellen wie unter

extension UIImagePickerController 
    { 
     override open var shouldAutorotate: Bool { 
       return true 
     } 
     override open var supportedInterfaceOrientations : UIInterfaceOrientationMask { 
       return .all 
     } 
    } 

Hoffnung, dass Sie