FileBrowser icon indicating copy to clipboard operation
FileBrowser copied to clipboard

It automatically removes the parent view controller?

Open ad184hl opened this issue 7 years ago • 1 comments

I have a RootViewController which is a UITabBarController;
then I have a NavigationController in this RootViewController;
after that I use self.navigationController?.pushViewController(vc, animated: true) to add a vc: CustomViewController in the NavigationController

Now I have below standard code to call this package in the vc: CustomViewController

let fileBrowser = FileBrowser(initialPath: documentsURL)
present(fileBrowser, animated: true, completion: nil)
fileBrowser.didSelectFile = { (file: FBFile) -> Void in
    // things I do here...
}

However, after I select file and did those things there. The vc: CustomViewController is removed! It directly shows the NavigationController level.

Anyone knows how to fix this? I still need to stay in the vc: CustomViewController.

ad184hl avatar Nov 11 '18 05:11 ad184hl

I find an alternative method.

In case someone needs it, please refer the Apple documentation about UIDocumentPickerViewController and UIDocumentBrowserViewController.

Much easier to use and control with native support.

ad184hl avatar Nov 12 '18 02:11 ad184hl