ios中怎样在onShareAppMessage转发页面时,让代码在截图之前执行
发布于 5 年前 作者 yonghao 9600 次浏览 来自 问答

业务需求:

在转发页面时,让页面内容整体上移,以便截图时能够截到部分内容。

onShareAppMessage: function (res) {

            let that = this;


            if (!that.isShare) {
                that.isShare = true;
                setTimeout(()=>{
                    that.isShare = false;
                }, 1000);

            }


            return {
                title: '转发页面',
                path: `pages/home/index',
            }
        },


使用华为手机测试,能成功通过isShare的值来截取到需要的内容。

使用iphone6测试,则截图发生在了isShare值改变之前,截取的内容还是转发之前的。

求问,ios中怎样确保能在截图前改变页面样式

回到顶部