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:
The ActionSheet
object contains the following methods.
Adds an ActionItem
object to the ActionSheet
object.
Syntax
addAction(
actionItem1)
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 only
Sets the anchor configuration information on iPads.
Syntax
setAnchorConfiguration(
configParams)
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 only
Shows the Action Sheet on the display.
Syntax
show();
Example
actionSheetObject.show();
Parameters
None.
Return Values
None.
Platform Availability
iOS only
Copyright © 2013 Kony, Inc. All rights reserved. |