mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-19 09:41:29 +00:00
Various fixes
This commit is contained in:
parent
212164b072
commit
34372148fb
@ -87,6 +87,12 @@ public extension ComponentTransition.Update {
|
|||||||
transition.setBounds(view: view, bounds: CGRect(origin: CGPoint(), size: size))
|
transition.setBounds(view: view, bounds: CGRect(origin: CGPoint(), size: size))
|
||||||
transition.setPosition(view: view, position: position)
|
transition.setPosition(view: view, position: position)
|
||||||
transition.setScale(view: view, scale: scale)
|
transition.setScale(view: view, scale: scale)
|
||||||
|
} else {
|
||||||
|
if view is UIScrollView {
|
||||||
|
let frame = component.size.centered(around: component._position ?? CGPoint())
|
||||||
|
if view.frame != frame {
|
||||||
|
transition.setFrame(view: view, frame: frame)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if component._anchorPoint != nil {
|
if component._anchorPoint != nil {
|
||||||
view.bounds = CGRect(origin: CGPoint(), size: size)
|
view.bounds = CGRect(origin: CGPoint(), size: size)
|
||||||
@ -95,6 +101,7 @@ public extension ComponentTransition.Update {
|
|||||||
}
|
}
|
||||||
transition.setPosition(view: view, position: position)
|
transition.setPosition(view: view, position: position)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
let opacity = component._opacity ?? 1.0
|
let opacity = component._opacity ?? 1.0
|
||||||
if view.alpha != opacity {
|
if view.alpha != opacity {
|
||||||
transition.setAlpha(view: view, alpha: opacity)
|
transition.setAlpha(view: view, alpha: opacity)
|
||||||
|
@ -723,6 +723,9 @@ public extension CombinedComponent {
|
|||||||
updatedChild.view.bounds = CGRect(origin: CGPoint(), size: updatedChild.size)
|
updatedChild.view.bounds = CGRect(origin: CGPoint(), size: updatedChild.size)
|
||||||
updatedChild.view.center = updatedChild._position ?? CGPoint()
|
updatedChild.view.center = updatedChild._position ?? CGPoint()
|
||||||
updatedChild.view.transform = CGAffineTransform(scaleX: scale, y: scale)
|
updatedChild.view.transform = CGAffineTransform(scaleX: scale, y: scale)
|
||||||
|
} else {
|
||||||
|
if updatedChild.view is UIScrollView {
|
||||||
|
updatedChild.view.frame = updatedChild.size.centered(around: updatedChild._position ?? CGPoint())
|
||||||
} else {
|
} else {
|
||||||
updatedChild.view.bounds = CGRect(origin: CGPoint(), size: updatedChild.size)
|
updatedChild.view.bounds = CGRect(origin: CGPoint(), size: updatedChild.size)
|
||||||
if updatedChild.view.layer.anchorPoint != CGPoint(x: 0.5, y: 0.5) {
|
if updatedChild.view.layer.anchorPoint != CGPoint(x: 0.5, y: 0.5) {
|
||||||
@ -731,6 +734,7 @@ public extension CombinedComponent {
|
|||||||
updatedChild.view.center = updatedChild._position ?? CGPoint()
|
updatedChild.view.center = updatedChild._position ?? CGPoint()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updatedChild.view.alpha = updatedChild._opacity ?? 1.0
|
updatedChild.view.alpha = updatedChild._opacity ?? 1.0
|
||||||
updatedChild.view.clipsToBounds = updatedChild._clipsToBounds ?? false
|
updatedChild.view.clipsToBounds = updatedChild._clipsToBounds ?? false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user