Various Fixes

This commit is contained in:
Ilya Laktyushin
2021-03-23 12:39:40 +05:00
parent 5d22762ab2
commit 44e243d1b1
3 changed files with 14 additions and 18 deletions

View File

@@ -258,17 +258,6 @@ public final class SearchDisplayController {
let backgroundNode = self.backgroundNode
let contentNode = self.contentNode
if animated {
if let placeholder = placeholder, let (layout, navigationBarHeight) = self.containerLayout {
let contentNodePosition = self.backgroundNode.layer.position
let targetTextBackgroundFrame = placeholder.convert(placeholder.backgroundNode.frame, to: nil)
var contentNavigationBarHeight = navigationBarHeight
if layout.statusBarHeight == nil {
contentNavigationBarHeight += 28.0
}
// self.backgroundNode.layer.animatePosition(from: contentNodePosition, to: CGPoint(x: contentNodePosition.x, y: contentNodePosition.y + (targetTextBackgroundFrame.maxY + 8.0 - contentNavigationBarHeight)), duration: 0.5, timingFunction: kCAMediaTimingFunctionSpring, removeOnCompletion: false)
}
backgroundNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.3, removeOnCompletion: false, completion: { [weak backgroundNode] _ in
backgroundNode?.removeFromSupernode()
})