modalPresentationStyle

IOS 13 presentationStyle default is UIModalPresentationAutomatic, the system according to the scenario is automatically choose the present way, When open the camera controller system automatically choose UIModalPresentationFullScreen, most other automatic selection UIModalPresentationPageSheet, UIModalPresentationFormSheet.

The following conditions need to be adapted:

  1. In the sheet state, there is a pull down gesture to exit the controller. At this time, the gesture is not triggered or a second confirmation is required

    // This property controls whether the pull down gesture is triggered. NO is triggered, YES is not
    vc.isModalInPresentation = NO;
    
    / / the vc UIAdaptivePresentationControllerDelegate comply with the agreement, implement the method
    - (void)presentationControllerDidAttemptToDismiss:(UIPresentationController *)presentationController {
        // Double confirmation, or other processing
    }
    
    Copy the code
  2. You need to manually set this parameter if you want to present it in full screen state

    vc.modalPresentationStyle = UIModalPresentationFullScreen;
    Copy the code