为什么 UIAnimation 中的完成处理程序是类型 ((Bool) -> Void)? bool 的目的是什么?

Why is the completion handler in UIAnimation of type ((Bool) -> Void)? And what is the purpose of the bool?

例如

    UIView.animate(withDuration: 0.5, animations: { 
        self.datePickerView.center.y = self.view.frame.height + (self.datePickerView.frame.height/2)
        self.datePickerOverlay.alpha = 0.0
    }) { (true) in
        self.view.sendSubview(toBack: self.datePickerOverlay)
        self.view.sendSubview(toBack: self.datePickerView)
    }
}

我知道完成块是一个闭包,您可以在其中执行您希望在动画之后发生的任务。我没有得到的是 bool 的功能。如您所见,我将 true 放在 bool 应该出现的位置。

但是,我想知道那个 bool 应该代表什么以及谁在 UIView.aniamteWithDuration() 中调用了那个 bool。

bool 是否应该代表 finished(在动画完成后 finished 将为真)?或者 bool 是否应该代表成功(从某种意义上说,如果动画成功完成 success 将为真)?

谢谢!

The Developer Reference 说:

A block object to be executed when the animation sequence ends. This block has no return value and takes a single Boolean argument that indicates whether or not the animations actually finished before the completion handler was called. If the duration of the animation is 0, this block is performed at the beginning of the next run loop cycle. This parameter may be NULL.