iOS7 iPad Landscape only app, using UIImagePickerController

前端 未结 6 850
北荒
北荒 2020-11-29 23:16

I believe this is a common issue and many answers don\'t work anymore, many just partial, if you are under iOS7 and your iPad app is Landscape only, but you want to use the

6条回答
  •  醉话见心
    2020-11-29 23:45

    Although most answers recommend using .currentContext, I have found out after dismissing the imagepicker, everything was wrong.

    On an Landscaped iPad, imho it's best if you would use .formSheet:

    let picker = UIImagePickerController()
    picker.modalPresentationStyle = .formSheet
    picker.sourceType = .photoLibrary
    picker.delegate = self
    self.present(picker, animated: true)
    

提交回复
热议问题