GIF-related improvements

This commit is contained in:
Ali
2020-05-22 19:13:47 +04:00
parent 29b23c767f
commit 2ab830e3a1
30 changed files with 1144 additions and 236 deletions

View File

@@ -433,8 +433,8 @@ public extension ContainedViewLayoutTransition {
}
}
func updateAlpha(node: ASDisplayNode, alpha: CGFloat, beginWithCurrentState: Bool = false, completion: ((Bool) -> Void)? = nil) {
if node.alpha.isEqual(to: alpha) {
func updateAlpha(node: ASDisplayNode, alpha: CGFloat, beginWithCurrentState: Bool = false, force: Bool = false, completion: ((Bool) -> Void)? = nil) {
if node.alpha.isEqual(to: alpha) && !force {
if let completion = completion {
completion(true)
}