- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我有一个 UIViewPropertyAnimator
管理模糊等,我只想将它用于它的 fractionComplete
属性。问题是,如果我将 fractionComplete
设置为 1.0
,它会完成并删除我想保留的所有动画。
基本上,我不希望动画师完成,因为这会清除它的动画 block 。
fractionComplete
钳制为 0.001...0.999
最佳答案
现在可以使用 iOS11 进行设置
var pausesOnCompletion: Bool { get set }
关于 UIViewPropertyAnimator
When the value of this property is true, the animator remains in the active state when the animation finishes, and it does not execute its completion handler. Keeping the animator in the active state allows you to reverse the animation even after it has finished. When the value of this property is false, the animator automatically transitions to the inactive state when the animation finishes, thereby concluding the animation. The default value of this property is false.
来源:https://developer.apple.com/documentation/uikit/uiviewpropertyanimator/2909004-pausesoncompletion
关于ios - 使 UIViewPropertyAnimator 永不完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44334389/
我是一名优秀的程序员,十分优秀!