mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Check more
This commit is contained in:
parent
f8b28f2416
commit
bd1a625db0
@ -71,7 +71,6 @@ public enum ContainedViewLayoutTransition {
|
||||
|
||||
public extension ContainedViewLayoutTransition {
|
||||
func updateFrame(node: ASDisplayNode, frame: CGRect, force: Bool = false, beginWithCurrentState: Bool = false, delay: Double = 0.0, completion: ((Bool) -> Void)? = nil) {
|
||||
var frame = frame
|
||||
if frame.origin.x.isNaN {
|
||||
return
|
||||
}
|
||||
@ -90,6 +89,12 @@ public extension ContainedViewLayoutTransition {
|
||||
if frame.size.height < 0.0 {
|
||||
return
|
||||
}
|
||||
if !ASIsCGRectValidForLayout(CGRect(origin: CGPoint(), size: frame.size)) {
|
||||
return
|
||||
}
|
||||
if !ASIsCGPositionValidForLayout(frame.origin) {
|
||||
return
|
||||
}
|
||||
|
||||
if node.frame.equalTo(frame) && !force {
|
||||
completion?(true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user