Re: macOS animation works once, then not again


Steve Mills
 

On Jan 30, 2018, at 14:40:29, Quincey Morris <quinceymorris@...> wrote:

On Jan 30, 2018, at 09:52 , Steve Mills <sjmills@...> wrote:

I don’t know, but your code made me wonder what happens (if you haven’t tried it already) if you remove this line from your completion handler:

self.bezView.alphaValue = 1;
and add this variation to the initiating animation block:

self.bezView.animator.alphaValue = 1;
Doing that did indeed make it work. I ended up with 3 animate/completion blocks: 1. Do the zoom/scroll. 2. Fade the bez in very quickly (0.001). 3. Fade the bez out.

I appreciate that Apple has continually added new ways to animate the UI, each one supposedly easier to use than the previous, but damn, there are so many gotchas with each one. One might suck at smooth resizing unless you set the layerContentsRedrawPolicy to a certain value. Another might be very easy to use, but doesn't do a whole bunch of properties at all. One clearly doesn't look at the current value of the property it's animating and start the animation there. Bleah!

Thanks for the suggestion!

--
Steve Mills
Drummer, Mac geek

Join cocoa@apple-dev.groups.io to automatically receive all group messages.