If you want to show a sheet of options where users can choose from, for IOS application, to make this possible please follow the instructions below:-
Install the plugin-
ActionSheet: a Cordova plugin from the below link:
https://github.com/EddyVerbruggen/cordova-plugin-actionsheet.git
and now add the following code in your js file
function testDeleteSheet() {
var options = {
'addCancelButtonWithLabel': 'Cancel',
'addDestructiveButtonWithLabel' : 'Delete note'
};
window.plugins.actionsheet.show(options, callback);
};
and call it from here:
var callback = function(buttonIndex) {
setTimeout(function() {
alert('button index clicked: ' + buttonIndex);
});
};
for more information:
github.com/EddyVerbruggen/cordova-plugin-actionsheet/blob/49523327854bf974f8bc1ac1ceeb877dcc7e5915/README.md
0 Comment(s)