Turning off NSPredicateEditor animation

64 views Asked by At

By default, adding and removing rows from NSPredicateEditor is done with animation. I'd like to get rid of that animation, or at least set its duration to zero, but have had no luck. Any ideas would be appreciated.

thanks

1

There are 1 answers

0
WetFish On

This is definitely not a good way, but it works:

Subclass NSPredicateEditor and add:

- (BOOL)animationShouldStart:(NSAnimation *)animation {
    animation.duration = 0.0;
    return YES;
}

This method is part of the NSAnimationDelegate protocol, which is apparently used by NSPredicateEditor. Please keep in mind, that this might break at any time. Lets hope Apple adds an official way to disable animations.