神飞扬
神飞扬
  • 发布:2016-12-01 14:25
  • 更新:2016-12-01 15:42
  • 阅读:1568

在manifest.json中的plus->popGetsture属性值设置为“none”则IOS下关闭侧滑返回功能

分类:MUI

在manifest.json中的plus->popGetsture属性值设置为“none”,
IOS手机侧滑还是能够返回, 什么原因??

如果在页面添加如下代码, 可以禁止侧滑返回, 但是必须每个页面都加!
var ws = plus.webview.currentWebview();
ws.setStyle({'popGesture': 'none'});

2016-12-01 14:25 负责人:无 分享
已邀请:
Trust

Trust - 少说废话

可以自行对mui的openWindow进行二次封装,在styles中设置该属性默认为none即可。

app.openWindow = function(url, id, extras, styles) {  
    styles.popGesture = styles.popGesture || 'none'; //默认为none  
    mui.openWindow({  
        url: url,  
        id: id,  
        extras: data,  
        styles: styles  
    });  
};

该问题目前已经被锁定, 无法添加新回复