init(parent: Progress?, userInfo : [ProgressUserInfoKey : Any]?)
init(totalUnitCount : Int64)
init(totalUnitCount : Int64, parent: Progress, pendingUnitCount : Int64)
Availability 有効性
Technology
unitCount
The total number of units of work to assign to the progress instance.
A new progress instance with its containing progress object set to nil.
Use this method to create the top-level progress object that your custom classes return. The receiver of the returned progress object can add it to a progress tree using add
.
You’re 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
.
あなたは、このメソッドを一方のメソッド上で発動して、それから返されるNSProgress
を別のスレッド上に通信によって(メッセージで)伝えられます。例えば、あなたは作成された進捗インスタンスを、あなたがdispatch
に渡すブロックの中でキャプチャできます。
In that block, you can invoke methods like become
or resign
, and set the completed
or is
properties as your app finishes its work.
init(parent: Progress?, userInfo : [ProgressUserInfoKey : Any]?)
init(totalUnitCount : Int64)
init(totalUnitCount : Int64, parent: Progress, pendingUnitCount : Int64)