2011/5/19 Andy Lee <ag...@mac.com>:
> On May 19, 2011, at 8:26 AM, Nick wrote:
>> hello!
>> Could you please advice me what would be the best way to "fade out"
>> and "fade in" a view? I tried using [[myView automator]
>
> Do you mean [myView animator]?

yes, of course, sorry for mistyping it

>
>> setAlphaValue:0.0] but after fading out it does not disappear. I need
>> it to "hide" after it fades out, i.e. a user can't click on its
>> buttons.
>>
>> [[myView automator] setVisible:NO] does not animate
>
> There is no setVisible: on NSView. There is setHidden:, but from a quick 
> experiment it does not seem to animate, which is unfortunate.

another mistype...

>
> Offhand I would add a method to that disables/enables all the controls in the 
> view.
>
> // To fade out:
> [self _setControlsWithinMyViewEnabled:NO];
> [[myView animator] setAlphaValue:0];
>
> // To fade in:
> [self _setControlsWithinMyViewEnabled:YES];
> [[myView animator] setAlphaValue:1];
>
> Maybe there's a better way.

I guess i'll try that callback idea with setAnimationDidStopSelector -
by setting setHidden:YES in that callback. I was just hoping that
there should be something like "animate and hide" for such a common
task. My core animation experiences are very poor :-)

Thanks for the response!
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to