Instance Property


An object encapsulating a user activity supported by this responder.


@property(nonatomic, strong) NSUserActivity *userActivity;


By setting the userActivity property on a responder, the NSUserActivity object becomes managed by UIKit. User activities managed by UIKit are saved automatically at appropriate times. You can lazily add state data representing the user’s activity via the updateUserActivityState: override. Multiple responders can share a single NSUserActivity instance, in which case they all get an updateUserActivityState: callback.

A responder object can set its userActivity property to nil if it no longer wants to participate. Any NSUserActivity objects that are managed by UIKit but which have no associated responders (or documents) are automatically invalidated.

See Also

Supporting User Activities

- restoreUserActivityState:

Restores the state needed to continue the given user activity.

- updateUserActivityState:

Updates the state of the given user activity.