ShortcutParams

Object of options for Titanium.UI.iOS.ApplicationShortcuts.addDynamicShortcut.

The parameters used when creating and receiving a shortcut. When used for creation, it must include at least the itemtype and title properties.

  • 5.1.0

NOTE This is an abstract type. Any object meeting this description can be used where this type is used.

Defined By

Properties

ShortcutParams
: Number/String/Titanium.Contacts.Person
The icon to be displayed on the application shortcut. ...

The icon to be displayed on the application shortcut. You can either use one of the constants like Titanium.UI.iOS.SHORTCUT_ICON_TYPE_COMPOSE, a local image specified by the image path or a reference to a Titanium.Contacts.Person.

If you are using one of the pre-defined constants, you can reference to the list of icons from Apple here.

If you are using an image file, enable slicing (adding the image to an asset catalog) for the project. To enable slicing, add the use-app-thinning element to the ios element in the tiapp.xml file and set the value to true. If you do not enable slicing, the image will not be displayed.

<ti:app>
  <ios>
    <use-app-thinning>true</use-app-thinning>
  </ios>
</ti:app>

The recommended size for image files is 35dp (@2px: 70dp, @3x: 105dp). Also check the Apple documentation
for more information on shortcut icons.

This API can be assigned the following constants:

ShortcutParams
itemtype : String

The unique key for the application shortcut.

The unique key for the application shortcut.

ShortcutParams
subtitle : String

The subtitle displayed on the application shortcut.

The subtitle displayed on the application shortcut.

The subtitle can be localized, see here for more infos.

ShortcutParams
title : String

The title of the application shortcut.

The title of the application shortcut.

The title can be localized, see here for more infos.

ShortcutParams
userInfo : Object

The userInfo of the application shortcut.

The userInfo of the application shortcut.

The userInfo is an object containing information about the shortcut like an ID or details about it.