Updates the state of the given user activity.
SDK
- macOS 10.10+
Framework
- App
Kit
Declaration
func updateUserActivityState(_ userActivity: NSUser Activity)
Parameters
userActivity
The user activity to be updated.
Discussion
Subclasses override this method to update the state of the supplied user
. Add state representing the user's activity into user
using its add
method. When the state is dirty, set the needs
property to true
.
When an NSUser
object managed by AppKit is updated, an empty user
dictionary is given to the user activity, and all of the objects associated with the user activity are sent an NSResponder
message.