Reputation: 885
How can I present the UIDocumentPickerViewController and dismissing it keeps the presented view controller in freeze
Upvotes: 1
Views: 461
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