Hi, I'm trying to resize my rect with CABasicAnimation and the animation go to up and not down How can I change it? Video: https://streamable.com/nw4ekc Thank you!
let newFrame = NSRect(x: blueRect.frame.origin.x, y: blueRect.frame.origin.y - 100,width: blueRect.frame.size.width, height: 200)
let animation = CABasicAnimation(keyPath: "bounds")
animation.fromValue = NSValue(rect: blueRect.frame)
animation.toValue = NSValue(rect: newFrame)
animation.duration = 0.5 // Animation duration in seconds
blueRect.layer?.add(animation, forKey: "sizeAnimation")
// Update the rect view's size and origin
blueRect.frame = newFrame