Steve
Steve

Reputation: 25

NSAnimation does not work with large NSViews

The code below works fine when I change the NSTextfield coordinate in an NSView with a width of 1000; however, it does not work when the view width is more than ~10000. There is no animation and the text just jumps to the new coordinate.

if isAnimateDataLabel {
    lb.frame.origin.y = 0
    NSAnimationContext.runAnimationGroup { context in
        context.allowsImplicitAnimation = true
        context.duration = 0.5
        lb.animator().frame.origin.y = y + offset
    }
}

I am a bit baffled by the issue and cannot pinpoint the root cause and the fix. Please suggest if you can figure out the issue.

Upvotes: 0

Views: 60

Answers (0)

Related Questions