I have an IOS app that navigates to a web page using a WKWebView. The page itself contains back buttons in the menu. When we click on a link to a PDF, the pdf itself displays in the view, but the other html content (including back buttons) disappears.
Is there any way for me to detect when a link returns a PDF and open that content externally in safari or a similar browser?
If that's not possible is there a way for me to detect when a link returns a PDF and show the web kit back buttons (just for that page).
Edit: Clarification
The link clicked to go to the pdf doesn't actually contain the pdf text. The link looks something like /Documents/GetDocument?docid=1234.
The content returned is of type application/pdf. In an ideal world we would be able to see the content returned from the link, and then handle appropriately.