Instance Method

becomeCurrentWithPendingUnitCount:

Sets the receiver as the current progress object of the current thread and specifies the portion of work to be performed by the next child progress object of the receiver.

Declaration

- (void)becomeCurrentWithPendingUnitCount:(int64_t)unitCount;

Parameters

unitCount

The number of units of work to be carried out by the next progress object that is initialized by invoking the initWithParent:userInfo: method in the current thread with the receiver set as the parent. This number represents the portion of work to be performed in relation to the total number of units of work to be performed by the receiver (represented by the value of the receiver’s totalUnitCount property). The units of work represented by this parameter must be the same units of work that are used in the receiver’s totalUnitCount property.

Discussion

Use this method to build a tree of progress objects, as described in Creating a Tree of Progress Objects.

See Also

Current Progress Object

+ currentProgress

Returns the NSProgress instance, if any, associated with the current thread by a previous invocation of becomeCurrentWithPendingUnitCount:.

- addChild:withPendingUnitCount:

Add a process object as a child of a progress tree. The inUnitCount indicates the expected work for the progress unit.

- resignCurrent

Balance the most recent previous invocation of becomeCurrentWithPendingUnitCount: on the same thread by restoring the current progress object to what it was before becomeCurrentWithPendingUnitCount: was invoked.