GitHub - yshxw/UIScreenShotListener: apicloud 模块ios 监听ios 关机+home 键截屏事件,并获取当前app截图 · GitHub
Skip to content

About

apicloud 模块ios 监听ios 关机+home 键截屏事件,并获取当前app截图

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

UIScreenShotListener

备注:里面的 .zip文件即为模块文件,可直接上传apicloud控制台自定义模块

截图1

示例代码:

var demo;

function apiready() {
    
    demo = api.require('UIScreenShotListener');
    
    takeScreenShot();
}



function takeScreenShot(){
    
    demo.addEventListener({
        name:"screenshot"  //必填
    },function(ret,err){
                          
        var imagePath = ret.imagePath
        var img = $api.byId('img');
        $api.attr(img,'src',ret.imagePath);

        alert("截图临时保存路径为:"+ret.imagePath);
                
    });

}

About

apicloud 模块ios 监听ios 关机+home 键截屏事件,并获取当前app截图

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages