Contents

updateUserActivityState(_:)

Updates the state of the given user activity.

Declaration

func updateUserActivityState(_ activity: NSUserActivity)

Parameters

  • activity:

    The user activity to be updated.

Discussion

The default implementation of this method puts the document’s fileURL into the NSUserActivity object’s userInfo dictionary with the NSUserActivityDocumentURLKey. NSDocument automatically sets the needsSave property of the NSUserActivity to true when the fileURL changes.

See Also

Related Documentation

Supporting User Activities