Creates and returns an
NSProgress instance attached to the specified parent with the
total set to
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The total number of units of work to be carried out.
The parent for the created
The unit count for the progress object.
Use this method to initialize a progress object with a specified parent and unit count.
In many cases you can simply precede code that does a substantial amount of work with an invocation of this method, then repeatedly set the
is property in the loop that does the work.
You can invoke this method on one thread and then message the returned
NSProgress on another thread. For example, you can capture the created progress instance in a block that you pass to
dispatch. In that block you can invoke methods like
resign, and set the
is properties as work is carried out.