Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 774 Bytes

README.md

File metadata and controls

30 lines (26 loc) · 774 Bytes

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,本人只是代码的搬运工...