Instance Method

updateUserActivityState(_:)

Updates the state of the given user activity.

Declaration

func updateUserActivityState(_ userActivity: 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. UIDocument automatically sets the needsSave property of the NSUserActivity object to true when the fileURL changes.

See Also

Supporting User Activities

var userActivity: NSUserActivity?

An object encapsulating a user activity supported by this document.

func restoreUserActivityState(NSUserActivity)

Restores the state needed to continue the given user activity.