How to enable peek and pop in iOS WebView?

I upload my website to UIWebView in my iOS app. How can I enable viewing and pop-up (3D Touch) for links in WebView?

Any ideas?

+5
source share
1 answer

According to recent Apple docs, you can enable peek and pop in a UIWebView with the allowLinkPreview option. https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/#//apple_ref/occ/instp/UIWebView/allowsLinkPreview

The trick with this option is that it only appears in Safari, and in the state of the document you cannot get around this. If you want peek and pop to stay in your application, you need to consider using the SFSafariViewController, but you will lose control over viewing the users web view.

+5
source

Source: https://habr.com/ru/post/1247372/


All Articles