Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
GH-68 (ios): Support for disabling 3D Touch link previews (#69)
Browse files Browse the repository at this point in the history
* Support for disabling 3D Touch link previews

* Update README.md

Instructions on how to use preference Allow3DTouchLinkPreview
  • Loading branch information
nilsd authored and jcesarmobile committed Dec 19, 2018
1 parent bf0f236 commit d0bd80a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ window.WkWebView.allowsBackForwardNavigationGestures(true)
window.WkWebView.allowsBackForwardNavigationGestures(false)
```

Disabling 3D Touch Link Previews
-----------

In order to disable preview popups when hard pressing links in iOS, you can set the following preference in your `config.xml`:

```xml
<preference name="Allow3DTouchLinkPreview" value="false" />
```

Limitations
--------

Expand Down
1 change: 1 addition & 0 deletions src/ios/CDVWKWebViewEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ - (void)updateSettings:(NSDictionary*)settings
}

wkWebView.allowsBackForwardNavigationGestures = [settings cordovaBoolSettingForKey:@"AllowBackForwardNavigationGestures" defaultValue:NO];
wkWebView.allowsLinkPreview = [settings cordovaBoolSettingForKey:@"Allow3DTouchLinkPreview" defaultValue:YES];
}

- (void)updateWithInfo:(NSDictionary*)info
Expand Down

0 comments on commit d0bd80a

Please sign in to comment.