0
votes

Since iOS15 the QLPreviewController added some additional BarbuttonItems on the top-right side when I'm previewing a PDF-file. It added a search-button and a draw-button (the one where you can draw lines on it). It's actually pretty cool that they added it, but the Share-button is now missing, since it doesn't fit there anymore. At least on my iPhone, because on my iPad there's enough space for three of them.

Now normally, they show the barbuttonitems that don't fit on an additional navigation bar at the bottom, but in my App the whole navigationbar at the bottom doesn't show up at all. However, it does show up if I tap it once in the middle--which makes everything but the document disappear--and then tap the middle again. Then the bottom navigationbar suddenly shows up as well, including a perfectly working Share-button.

1

1 Answers

0
votes

I found out that my problem was the UITabbarController at the bottom. Once I tried the functionality to hide the tabbar on push, the bottom navigationbar with the Share-button is immediately shown. It's still a bug and I'll file one at Apple, but the current solution is quite okay.

Here's the code:

let vc = OverviewsQuickLookViewController()
vc.dataSource = self
vc.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(vc, animated: true)

I hope this might help someone!