A Boolean value that determines whether pressing on a link displays a preview of the destination for the link.
- iOS 9.0–12.0Deprecated
- Mac Catalyst 13.0–13.0Deprecated
This property is available on devices that support 3D Touch. Default value is
If you set this value to
YES for a web view, users (with devices that support 3D Touch) can preview link destinations, and can preview detected data such as addresses, by pressing on links. Such previews are known to users as peeks. If a user presses deeper, the preview navigates (or pops, in user terminology) to the destination. Because pop navigation switches the user from your app to Safari, it is opt-in, by way of this property, rather default behavior for this class.
If you want to support link preview but also want to keep users within your app, you can switch from using the
UIWeb class to the
SFSafari class. If you are using a web view as an in-app browser, making this change is best practice. The Safari view controller class automatically supports link previews.