tjwudi / cordova-actionsheet

Cordova ARC plugin for UIActionSheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cordova ActionSheet Plugin

by Olivier Louvignes updated by [Etienne Adriaenssen] for Phonegap 3.0 using the command phonegap plugin add https://github.com/etiennea/cordova-actionsheet

DESCRIPTION

  • This plugin provides a simple way to use the UIActionSheet native component from iOS.

  • This plugin is built for Cordova >= v3.0.0 with ARC.

Cordova ActionSheet Plugin

by Olivier Louvignes updated by [Etienne Adriaenssen] for Phonegap 3.0 updated by [Benjamin Horner] for Phonegap 3.0

DESCRIPTION

  • This plugin provides a simple way to use the UIActionSheet native component from iOS.

  • This plugin is built for Cordova >= v3.0.0 with ARC.

USAGE

CLI : cordova plugin add https://github.com/benjaminhorner/cordova-actionsheet.git

// After device ready
// Basic with title
window.plugins.actionSheet.create({title: 'Title', items: ['Foo', 'Bar']}, function(buttonValue, buttonIndex) {
    console.warn('create(), arguments=' + Array.prototype.slice.call(arguments).join(', '));
});

// Complex
window.plugins.actionSheet.create({items: ['Add', 'Delete', 'Cancel'], destructiveButtonIndex: 1, cancelButtonIndex: 2}, function(buttonValue, buttonIndex) {
    console.warn('create(), arguments=' + Array.prototype.slice.call(arguments).join(', '));
});

LICENSE

The MIT License

Copyright (c) 2012 Olivier Louvignes

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

CREDITS

Contributors :

About

Cordova ARC plugin for UIActionSheet