Instance Method

widgetPerformUpdateWithCompletionHandler:

Called to give a widget an opportunity to update its contents.

Declaration

- (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult result))completionHandler;

Parameters

completionHandler

A block to be called when the widget’s content has been updated.

The block takes the following parameter:

result

A value of type NCUpdateResult that describes the result of the update procedure. (NCUpdateResult lists the possible values of result.)

Discussion

This method is called to give a widget an opportunity to update its contents and redraw its view prior to an operation such as a snapshot. When the widget is finished updating its contents (and redrawing, if necessary), the widget should call the completion handler block, passing the appropriate NCUpdateResult value.

See Also

Updating a Widget’s Contents

NCUpdateResult

The result of updating a widget's state.