帖子
帖子
用户
博客
课程
显示全部楼层
78
帖子
2
勋章
1332
Y币

[插件使用] floatButton ios 端,不显示按钮

[复制链接]
发表于 2021-4-21 14:53:12
本帖最后由 @merforg 于 2021-4-21 15:10 编辑

在ios端,重复打开关闭的操作,有时候会出现 图标不显示的问题,调用 openButton和fnShowFloatButton 返回的true;
关闭的时候调用的是fnCloseFloatButton,每次关闭都会返回true
216
帖子
5
勋章
5941
Y币
你代码是怎么写的?图片传的是什么?
78
帖子
2
勋章
1332
Y币
本帖最后由 @merforg 于 2021-4-21 16:06 编辑
52yaoer 发表于 2021-4-21 15:50
你代码是怎么写的?图片传的是什么?

var floatButton = api.require('floatButton');
    floatButton.openButton({
        rect : {
            x : 300,
            y : 263,
            w : 50,
            h : 50
        },
        lineColor : '',
        btnPic : 'widget://image/focus/icon_live_other.png'
    }, function(ret) {
        fnShowFloatButton();
        warn('直播按钮打开成功。。'+JSON.stringify(ret));
    });



var floatButton = api.require('floatButton');
  floatButton.closeButton(function(ret, err) {
      warn('关闭浮动按钮。。。'+JSON.stringify(ret));
  });

var floatButton = api.require('floatButton');
  floatButton.showButton(function(ret) {
    warn('显示直播按钮'+JSON.stringify(ret));
  });



78
帖子
2
勋章
1332
Y币
@merforg 发表于 2021-4-21 16:04
var floatButton = api.require('floatButton');
    floatButton.openButton({
        rect : {

floatButton.showButton(function(ret) {
    warn('显示直播按钮'+JSON.stringify(ret));
  });
216
帖子
5
勋章
5941
Y币
只执行openButton,  就会显示吧?其他接口先不要执行咯。
78
帖子
2
勋章
1332
Y币
52yaoer 发表于 2021-4-21 17:41
只执行openButton,  就会显示吧?其他接口先不要执行咯。

closeButton 也不执行吗
216
帖子
5
勋章
5941
Y币
closeButton 就关闭了咯。删除了,按钮就不会显示咯
您需要登录后才可以回帖 登录

本版积分规则