---
title: allowsLinkPreview
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiwebview/allowslinkpreview
---

# allowsLinkPreview

A Boolean value that determines whether pressing on a link displays a preview of the destination for the link.

## Declaration

```swift
var allowsLinkPreview: Bool { get set }
```

## Discussion

Discussion This property is available on devices that support 3D Touch. Default value is false. If you set this value to true 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 UIWebView class to the SFSafariViewController 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.

## See Also

### Setting web content properties

- [scalesPageToFit](uikit/uiwebview/scalespagetofit.md)
- [scrollView](uikit/uiwebview/scrollview.md)
- [suppressesIncrementalRendering](uikit/uiwebview/suppressesincrementalrendering.md)
- [keyboardDisplayRequiresUserAction](uikit/uiwebview/keyboarddisplayrequiresuseraction.md)
- [dataDetectorTypes](uikit/uiwebview/datadetectortypes.md)
