使用最新版本的SDK(9.26版本)打包,在ios11环境下顶部灰条,沉浸式状态栏设置无效,于是看到了这篇帖子
http://ask.dcloud.net.cn/article/12834
但并未说明离线配置的详细步骤
请官方给出一个方案,谢谢!
使用最新版本的SDK(9.26版本)打包,在ios11环境下顶部灰条,沉浸式状态栏设置无效,于是看到了这篇帖子
http://ask.dcloud.net.cn/article/12834
但并未说明离线配置的详细步骤
请官方给出一个方案,谢谢!
我们会尽快在原生层处理这个问题,并更新SDK,暂时大家可以采用如下方法处理这个问题
下面提供一下NJS的的设置方法,
在需要沉浸式的那个页面里plusready事件之后执行如下NJS代码。
var web = plus.ios.currentWebview();
var scr = plus.ios.getAttribute(web, "scrollView");
plus.ios.setAttribute(scr,"contentInsetAdjustmentBehavior","0");
下面是原生代码设置
1 在H5WEEngineExport.h头文件中增加属性
@property (nonatomic, readonly, strong) UIScrollView scrollView;
2 通过PDRCoreAppWindow对象的方法获取要设置沉浸式的页面的PDRCoreAppFrame对象
PDRCoreAppFrame pFrame = [[pAppHandle appWindow] getFrameByName:@"Main.html"];
3 设置PDRCoreAppFrame对象的scrollView属性的
pFrame.webEngine.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
胡虎
大神,第2个是怎么解决的?
2017-11-29 09:07