Skip to content

Cordova SnipImage plugin(只适用于iOS端的Cordova截图插件)

Notifications You must be signed in to change notification settings

polvae/SnipImage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

com.cordova.SnipImage

Cordova SnipImage plugin(只适用于iOS端的Cordova截图插件)

将iOS原生代码对Cordova插件的简单封装



js端代码(调用iOS原生代码)

function begin(){

    cordova.exec(alertSuccess,alertFail,"PhotoSnipPlugin","coolMethod",["camera","1"]);

}

调用成功的回调函数

function alertSuccess(msg) {
    alert(msg);
}

调用失败的回调函数

function alertFail(msg) {
    alert('调用OC失败: ' + msg);
}

使用方法

插件文件下PhotoSnipPlugin导入到工程即可使用

感谢作者3tinkers/TKImageView,本人只是代码的搬运工...

About

Cordova SnipImage plugin(只适用于iOS端的Cordova截图插件)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published