ActionSheet Object
The ActionSheet object implements Apple's Action Sheets for iOS apps. They are not supported on other platforms. The ActionSheet object comprises of the following elements:
Methods
The ActionSheet object contains the following methods.
Adds an ActionItem object to the ActionSheet object.
Syntax
addAction(actionItem1);
Input Parameters
| Parameter | Description | 
|---|---|
| actionItem1 | An ActionItem object to add to the Action Sheet. | 
                                                                    
Example
//Creating the Action Item Object
setActionSheet: function() {
    var actionItem = new kony.ui.ActionItem({
        "title": "Open Basecamp",
        "style": constants.ACTION_STYLE_DEFAULT,
        "action": function() {
            kony.application.openURL("https://basecamp.kony.com/s/");
        }
    });
    //Adding action to the Action Sheet object    
    actionSheetObject.addAction(actionItem);
}Return Values
None.
Platform Availability
iOS
Dismisses the Action Sheet on the display.
Syntax
dismiss();
Input Parameters
None.
Example
actionSheetObject.dismiss();
Return Values
None.
Platform Availability
iOS
Sets the anchor configuration information on iPads.
Syntax
setAnchorConfiguration(configParams);
Input Parameters
| Parameter | Description | 
|---|---|
| configParams | 
                                                                             A JavaScript object containing key-value pairs that specify the anchor configuration parameters for the Action Sheet. The following keys are required. 
 
  | 
                                                                    
Example
var configInfo = {
    "direction": constants.ANCHOR_DIRECTION_LEFT,
    "widget": frmWidgetName
};
myActionSheet.setAnchorConfiguration(configInfo);Return Values
None.
Remarks
This method is only used on the iPad.
Platform Availability
iPad
Shows the Action Sheet on the display.
Syntax
show();
Example
actionSheetObject.show();
Input Parameters
None.
Return Values
None.
Platform Availability
iOS