iOS7 iPad Landscape only app, using UIImagePickerController

前端 未结 6 849
北荒
北荒 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:50

    I have seen this code from Apple's Sample Code.

    UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
    imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
    

    Due to this UIModalPresentationCurrentContext UIImagePickerController will be opened as per device's current orientation.

提交回复
热议问题