[关闭]
@YDS 2017-07-21T14:01:54.000000Z 字数 248 阅读 382

沉浸式位置

开发问题


在app开发过程中要将header部分加入沉浸式$api.fixStatusBar(header);
但是在加入沉浸式时注意添加的位置,尤其是当下面js语句需要获取header高度时,否则获取的数值将有问题(小),顺序应为
1.获取header节点
var header=$api.byId('search');
2.加入沉浸式
$api.fixStatusBar(header);
3.获取header高度
var headerh=$api.offset(header).h;

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注