Reputation: 436
Code for the thing
let fileBrowser = UIDocumentPickerViewController(documentTypes: listOfAllTypesOfFiles, in: UIDocumentPickerMode.open)
fileBrowser.allowsMultipleSelection = false
fileBrowser.delegate = self
navigationController?.present(fileBrowser, animated: true, completion: nil)
Not sure why, but it shows that empty space at the bottom. Anyone knows what that is?
Upvotes: 0
Views: 706
Reputation: 1
I had a similar problem. In my case it was
UITabBar.appearance().isTranslucent = false
I created my own UIDocumentPickerViewController and am using it.
final class SbisDocumentPickerViewController: UIDocumentPickerViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let toolbar = UIToolbar.appearance()
toolbar.isTranslucent = true
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
let toolbar = UIToolbar.appearance()
toolbar.isTranslucent = false
}
}
Upvotes: 0
Reputation: 179
It turns out that I had a global appearance()
customisation causing issues with the document picker.
In my case this was the line causing the issue, removing it enabled the UIDocumentPickerViewController
to display correctly.
UITabBar.appearance().isTranslucent = false
I've applied the appearance to my UITabBar
directly instead of globally.
Alexander above (although downvoted) helped track the solution. Hope this helps whoever comes after.
Upvotes: 1
Reputation: 436
Found the issue. It was customizing tab bar via appearance. In particular that big chunk of view was some messed up version of shadow image which looks fine in main app, but not so much there. Don't customize your stuff like that people :)
Upvotes: 1