voltmx.todayExtension Functions
The voltmx.todayExtension namespace contains the following functions.
voltmx.todayExtension.setExtensionsCallbacks Function
Sets a Today Extension with callbacks for app extension state changes.
Syntax
Input Parameters
callbacks
Contains an object with key-value pairs where the key specifies the extension state and value as a callback function. The following are the possible extension states.
Constant | Description |
---|---|
beginRequestWithExtensionContext | The user has selected the action. |
loadView | Loads a view that the controller manages. |
viewDidAppear | A view was just displayed. |
viewWillAppear | A view is about to be displayed. |
viewDidDisappear | A view just removed from the view heirarchy. |
viewWillDisappear | A view is about to be removed from the view hierarchy. |
widgetActiveDisplayModeDidChangeWithMaximumSize | The active display mode has changed. |
widgetPerformUpdate | It is time for the widget to update its state |
Example: loadView
Example: viewDidAppear
Example: viewWillAppear
Example: viewDidDisappear
Example: viewWillDisappear
Example: widgetActiveDisplayModeDidChangeWithMaximumSize
Example: widgetPerformUpdate
Return Values
None.