Fix fast account switcher animation weirdness when 1 account only
This commit is contained in:
parent
9026f487ec
commit
e6e5554edf
|
@ -73,12 +73,12 @@ class FastAccountSwitcherViewController: UIViewController {
|
||||||
|
|
||||||
accountView.alpha = 0
|
accountView.alpha = 0
|
||||||
accountView.transform = CGAffineTransform(scaleX: 1.2, y: 1.2)
|
accountView.transform = CGAffineTransform(scaleX: 1.2, y: 1.2)
|
||||||
UIView.addKeyframe(withRelativeStartTime: relStart, relativeDuration: relDuration) {
|
UIView.addKeyframe(withRelativeStartTime: relStart, relativeDuration: relDuration / 2) {
|
||||||
accountView.alpha = 1
|
accountView.alpha = 1
|
||||||
accountView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9)
|
accountView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9)
|
||||||
}
|
}
|
||||||
|
|
||||||
UIView.addKeyframe(withRelativeStartTime: relStart + relDuration, relativeDuration: relDuration) {
|
UIView.addKeyframe(withRelativeStartTime: relStart + relDuration / 2, relativeDuration: relDuration / 2) {
|
||||||
accountView.transform = .identity
|
accountView.transform = .identity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue