Check more

This commit is contained in:
Ali 2020-11-14 20:04:19 +04:00
parent f8b28f2416
commit bd1a625db0

View File

@ -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)