Re: The simplest way to fade out a view
Re: The simplest way to fade out a view
- Subject: Re: The simplest way to fade out a view
- From: Quincey Morris <email@hidden>
- Date: Thu, 19 May 2011 12:27:39 -0700
On May 19, 2011, at 11:22, Gustavo Pizano wrote:
> Why will it be a bug?, a fade-in animation goes form 0 to 1 alpha, so at the start point the alpha value must 0 no?
What actually happens in Snow Leopard (IIRC -- it was a few weeks ago that I was using NSViewAnimation) is that the view fades in normally, but at the end of animation it vanishes again because it's still officially hidden. So, the fade-in animation works, but it just doesn't "stick" at the end. You can google the 'NSViewAnimationFadeInEffect' effects key if you want to read more about it.
The *technical* answer to the OP's question is easily findable by googling. However, in this case, the fault is really Apple's. It's hard to know that NSViewAnimation even exists, starting from any obvious place, such as the NSView documentation. The OP and the people who responded can't really be blamed for not realizing there are two intermediate APIs -- NSViewAnimation and NSAnimation -- between the obvious extremes that *are* well-pointed-to in the documentation -- [NSView animator] and layers.
_______________________________________________
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