0

How can I present the UIDocumentPickerViewController and dismissing it keeps the presented view controller in freeze

User1075
  • 819
  • 15
  • 36
  • may be your PDFBrowserViewController is still there that's why the blur view is there. just paste PDFBrowserViewController viewDidLoad code on your button and it will work – Vipin Pareek Sep 10 '20 at 06:26

1 Answers1

1

Problem is that you open UIDocumentPickerViewController in PDFBrowserViewController so when you dismiss UIDocumentPickerViewController but PDFBrowserViewController was not dismissed.

solution 1: open UIDocumentPickerViewController directly in top viewcontroller without use of PDFBrowserViewController.

solution 2: after dismiss UIDocumentPickerViewController dismiss the parent controller in Delegate methods.

UIWindow *window = [[[UIApplication sharedApplication] windows] firstObject];
UIViewController *vc = [window rootViewController];
[vc dismissViewControllerAnimated:true completion:nil];
Dhawal
  • 1,055
  • 6
  • 10