I have some NSView that I want to animate, but NSView has an NSTableView inside, which does not display correlation when the view is supported based on layers (which in turn is not practical to animate the view). So my answer was to make a layer with a layer support right before the animation, and then when the animation was done, delete the layer, for example:
[animatingView setWantsLayer: YES]; [NSAnimationContext beginGrouping]; [[animatingView animator] animateSomething]; [[NSAnimationContext currentContext] setCompletionHandler: ^{ [animatingView setWantsLayer: NO]; }]; [NSAnimationContext endGrouping];
However, with this code, the view is not animated at all. I found that if I delete the line [animatingView setWantsLayer: NO]; , it is animated only on the right, but then the table view is not displayed correctly (see this question for an example of one of the problems).
So my question is: how can I solve this? I want to animate a view, but I want the tables to display correctly, and this workaround does not work. And I donβt understand why ...
source share