User1075
User1075

Reputation: 885

Presenting the UIDocumentPickerViewController and dismissing it keeps the presented view controller in freeze

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

Upvotes: 1

Views: 461

Answers (1)

Dhawal
Dhawal

Reputation: 1065

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];

Upvotes: 1

Related Questions