invalidate()
Invalidates an activity and marks it as no longer eligible for continuation.
Declaration
func invalidate()Discussion
Call this method when the user stops engaging in the associated activity and that activity is no longer available. For example, you might call this method when the user closes the window associated with the activity. After calling this method on a user activity object, calling the becomeCurrent() method on that object has no effect.