Voice Chat UI improvements

This commit is contained in:
Ilya Laktyushin
2020-12-09 17:02:22 +04:00
parent 7489524aa5
commit 8af1de7109
7 changed files with 148 additions and 65 deletions

View File

@@ -1051,14 +1051,15 @@ public extension ContainedViewLayoutTransition {
#if os(iOS)
public extension ContainedViewLayoutTransition {
func animateView(_ f: @escaping () -> Void) {
func animateView(_ f: @escaping () -> Void, completion: ((Bool) -> Void)? = nil) {
switch self {
case .immediate:
f()
completion?(true)
case let .animated(duration, curve):
UIView.animate(withDuration: duration, delay: 0.0, options: curve.viewAnimationOptions, animations: {
f()
}, completion: nil)
}, completion: completion)
}
}
}