This should also work and require way less code changes than the above:
NSAnimationContext.runAnimationGroup { animationContext in
context.duration = animated ? 0.5 : 0
clipView.animator().setBoundsOrigin(p)
} completionHandler: {
Task {
await MainActor.run {
self.endIgnoreFrameChangeEvents()
}
}
}
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: