Skip to content

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.

addAction


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 voltmx.ui.ActionItem({
        "title": "Open Basecamp",
        "style": constants.ACTION_STYLE_DEFAULT,
        "action": function() {
            voltmx.application.openURL("https://support.hcltechsw.com/community?id=community_forum&sys_id=1cdf6e1a1bf31898beab64e6ec4bcbae");
        }
    });
    //Adding action to the Action Sheet object    
    actionSheetObject.addAction(actionItem);
}


Return Values

None

Platform Availability

iOS only


Dismiss


Dismisses the Action Sheet on the display.

Syntax

dismiss()


Input Parameters

None

Example

actionSheetObject.dismiss();


Return Values

None

Platform Availability

iOS only


setAnchorConfiguration


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.

  • direction: A constant from the Action Sheet Anchor Direction Constants that specifies the side of the widget that the Action Sheet attaches to.
  • widget: The widget that the Action Sheet attaches to.

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


show


Shows the Action Sheet on the display.

Syntax

show();


Example

actionSheetObject.show();


Input Parameters

None

Return Values

None

Platform Availability

iOS only