Begin an activity using the given options and reason.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
- (id<NSObject>)beginActivityWithOptions:(NSActivity Options)options reason:(NSString *)reason;
Parameters
options
Options for the activity. See
NSActivity
for possible values.Options reason
A string used in debugging to indicate the reason the activity began.
Return Value
An object token representing the activity.
Discussion
Indicate completion of the activity by calling end
passing the returned object as the argument.