Type Method


Creates and returns an NSProgress instance with the specified totalUnitCount that is not part of any existing progress tree. The instance is initialized using initWithParent:userInfo: with the parent set to nil.


+ (NSProgress *)discreteProgressWithTotalUnitCount:(int64_t)unitCount;



The total number of units of work to be carried out.


Use this method to create the top level progress object returned by your own custom classes. The user of the returned progress object can add it to a progress tree using addChild:withPendingUnitCount:.

You are responsible for updating the progress count of the created progress object. 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_async. In that block you can invoke methods like becomeCurrentWithPendingUnitCount: or resignCurrent, and set the completedUnitCount or cancelled properties as work is carried out.

See Also

Creating Progress Objects

- initWithParent:userInfo:

Initializes a newly allocated NSProgress instance.

+ progressWithTotalUnitCount:

Creates and returns an NSProgress instance, initialized using initWithParent:userInfo:.

+ progressWithTotalUnitCount:parent:pendingUnitCount:

Creates and returns an NSProgress instance attached to the specified parent with the totalUnitCount set to portionOfParentTotalUnitCount.