mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fix blur animations on older systems
This commit is contained in:
@@ -366,8 +366,10 @@ private final class ContextControllerNode: ViewControllerTracingNode, UIScrollVi
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
self.effectView.effect = makeCustomZoomBlurEffect()
|
||||||
|
self.effectView.alpha = 0.0
|
||||||
UIView.animate(withDuration: 0.2 * animationDurationFactor, animations: {
|
UIView.animate(withDuration: 0.2 * animationDurationFactor, animations: {
|
||||||
self.effectView.effect = makeCustomZoomBlurEffect()
|
self.effectView.alpha = 1.0
|
||||||
}, completion: { [weak self] _ in
|
}, completion: { [weak self] _ in
|
||||||
self?.didCompleteAnimationIn = true
|
self?.didCompleteAnimationIn = true
|
||||||
})
|
})
|
||||||
@@ -478,11 +480,7 @@ private final class ContextControllerNode: ViewControllerTracingNode, UIScrollVi
|
|||||||
self.effectView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.05 * animationDurationFactor, delay: 0.15, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false)
|
self.effectView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.05 * animationDurationFactor, delay: 0.15, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false)
|
||||||
} else {
|
} else {
|
||||||
UIView.animate(withDuration: 0.21 * animationDurationFactor, animations: {
|
UIView.animate(withDuration: 0.21 * animationDurationFactor, animations: {
|
||||||
if #available(iOS 9.0, *) {
|
self.effectView.alpha = 0.0
|
||||||
self.effectView.effect = nil
|
|
||||||
} else {
|
|
||||||
self.effectView.alpha = 0.0
|
|
||||||
}
|
|
||||||
}, completion: { _ in
|
}, completion: { _ in
|
||||||
completedEffect = true
|
completedEffect = true
|
||||||
intermediateCompletion()
|
intermediateCompletion()
|
||||||
|
|||||||
Reference in New Issue
Block a user