0

I spot that my code behaves differently on iOS13 / iOS14. I am downloading pdf file and showing it with UIDocumentInteractionController

     DispatchQueue.main.async {
        let controladorDoc = UIDocumentInteractionController(url: PdfUrl)
        controladorDoc.delegate = self
        controladorDoc.presentPreview(animated: true)
    }

after pdf is shown I am clicking "Save" button. Here is the difference:

iOS13

iOS14

Save and Cancel buttons are missing. How to fix that ? I was thinking about overloading buttons in actions menu but I didn't find how to make that.

user3626411
  • 188
  • 2
  • 3
  • 15
  • Are they missing or are they just white? Try tapping where the button should be and see if that works. Are you using UIAppearance? – EmilioPelaez Jan 15 '21 at 10:05
  • Hi @EmilioPelaez yes, that's something which I forgot to add, they seems to be white. When I click in corner it's working. I am not using UIAppearance. Only UIDocumentInteractionController + delegate documentInteractionControllerViewControllerForPreview(_ controller: UIDocumentInteractionController) -> UIViewController – user3626411 Jan 15 '21 at 11:56
  • UINavigationBar.appearance().tintColor = .white – user3626411 Jan 15 '21 at 12:11
  • @EmilioPelaez I was wrong I am using UIAppearance on the very beginning in AppDelegate, faulty line of code: UINavigationBar.appearance().tintColor = .white Please post your comment as answer I will mark it as solution, thank you! – user3626411 Jan 15 '21 at 12:17

1 Answers1

1

If your buttons are working but are invisible it's very likely that you are using UIAppearance somewhere and that's causing your buttons to become the same color as the navigation bar.

EmilioPelaez
  • 18,758
  • 6
  • 46
  • 50