Re: NSAnimatablePropertyContainer
Re: NSAnimatablePropertyContainer
- Subject: Re: NSAnimatablePropertyContainer
- From: "I. Savant" <email@hidden>
- Date: Fri, 16 Nov 2007 12:49:41 -0500
On 11/16/07, Troy Stephens <email@hidden> wrote:
> The way the code is written now, [[myCustomView animator]
> setImageAlpha:0.0] queues up an animation from the present value to
> 0.0 (which won't begin executing until control returns to the
> runloop). Then [[myCustomView animator] setImageAlpha:1.0] schedules
> another animation to 1.0 that supersedes the animation to 0.0. Almost
> certainly the reason that changes to "imageToDisplay" after the first
> fail to animate is that imageAlpha is already 1.0, so the animation to
> 1.0, the one that replaces the animation to 0.0, has nothing to do.
I sort of figured that's another part of what was going on (never
mind that the image old image is no longer there the next time the
view is asked to draw), but maybe I should clarify a bit. I want the
following to happen when a new image is set:
1 - Fade the old image out.
2 - Swap images.
3 - Fade the new image in.
This requires the ability to set up a blocking animation, which (as
suggested off-list) does not seem possible. In the same off-list
response, I was told (paraphrasing) I should probably be forgetting
about the alpha and just use a CATransition (fade) between old and new
images.
Even with that, though, the problem remains. I can't fade the old
image out and the new one in asynchronously because the image changes
before the animation is started. I can't help feeling I'm missing
something ridiculously obvious.
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden