UI improvements

This commit is contained in:
Ali
2023-01-22 00:01:06 +04:00
parent ac34aac586
commit 55d076a494
17 changed files with 178 additions and 95 deletions

View File

@@ -299,7 +299,7 @@ public struct Transition {
}
}
public func attachAnimation(view: UIView, completion: @escaping (Bool) -> Void) {
public func attachAnimation(view: UIView, id: String, completion: @escaping (Bool) -> Void) {
switch self.animation {
case .none:
completion(true)
@@ -307,7 +307,7 @@ public struct Transition {
view.layer.animate(
from: 0.0 as NSNumber,
to: 1.0 as NSNumber,
keyPath: "attached\(UInt32.random(in: 0 ... UInt32.max))",
keyPath: id,
duration: duration,
delay: 0.0,
curve: curve,