performActivity(options:reason:using:)
Synchronously perform an activity defined by a given block using the given options.
Declaration
func performActivity(options: ProcessInfo.ActivityOptions = [], reason: String, using block: @escaping () -> Void)Parameters
- options:
Options for the activity. See Activityoptions for possible values.
- reason:
A string used in debugging to indicate the reason the activity began.
- block:
A block containing the work to be performed by the activity.
Discussion
The activity will be automatically ended after block returns.