Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20178] iOS: Support Peek and Pop in Ti.UI.WebView

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-01-12T07:12:25.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsiOS
Labels3dtouch, ios, ios9, peekandpop, qe-5.4.0
ReporterHans Knöchel
AssigneeHans Knöchel
Created2015-12-27T17:44:28.000+0000
Updated2016-06-10T17:41:18.000+0000

Description

iOS 9 introduced an API to support Peek and Pop (3D-Touch) in WebViews like Safari does. It is disabled by default, but users should have the ability to enable it.

Comments

  1. Hans Knöchel 2015-12-27

    PR: https://github.com/appcelerator/titanium_mobile/pull/7600 Demo:
       var win = Ti.UI.createWindow({
       	title: "TTIMOB-19806"
       });
       
       var allowsLinkPreview = false;
       
       var web = Ti.UI.createWebView({
       	url: "http://google.de",
       	allowsLinkPreview: allowsLinkPreview
       });
       win.add(web);
       
       var btn = Ti.UI.createButton({
       	title: "allowsLinkPreview = " + allowsLinkPreview,
       	bottom: 0,
       	backgroundColor: "#000",
       	color: "#fff",
       	width: Ti.UI.FILL,
       	height: 40
       });
       
       btn.addEventListener("click", function() {
       	allowsLinkPreview = !allowsLinkPreview;
       	this.setTitle("allowsLinkPreview = " + allowsLinkPreview);
       	web.setAllowsLinkPreview(allowsLinkPreview);
       });
       
       win.add(btn);
       win.open();
       
  2. Harry Bryant 2016-06-10

    Verified as fixed, web.setAllowsLinkPreview now allows Peek and Pop features to be enabled / disabled for Ti.UI.WebView. Tested On: iPhone 6S (9.3.2) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160608165242 Appc Studio: 4.6.0.201605201934 Appc NPM: 4.2.7-2 App CLI: 5.4.0-15 Xcode 7.3 Node v4.2.6 *Closing ticket.*

JSON Source