• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [[NSView animator] setHidden:YES] doesn't fade?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [[NSView animator] setHidden:YES] doesn't fade?


  • Subject: Re: [[NSView animator] setHidden:YES] doesn't fade?
  • From: Bill Dudney <email@hidden>
  • Date: Wed, 23 Jan 2008 07:15:02 -0700

Hi Philip,

As others have suggested if you turn on layer backing ([view setWantsLayer:YES]) you can get the fade simply by removing the subview from its superview.

i.e.

- (void)removeView:(id)sender {
// myView is layer backed
NSView *removedView = [[myView subviews] objectAtIndex:0]; // just for illustration, find removedView however it makes sense for your code
[[removedView animator] removeFromSuperview];
}


As long as removedView's superview is layerbacked it will get the default animation (fade).

HTH,


-bd- http://bill.dudney.net/roller/objc

On Jan 22, 2008, at 6:06 PM, Philip Dow wrote:

Hi all,

I'm looking to fade a view on Leopard. I'm using the animator to successfully move the view by changing its frame, but calling setHidden on it does not seem to fade it -- behavior I would expect.

Is this the right way to fade a view, or is fading not a built-in animation?

I'm calling the method inside an NSAnimationContext grouping, and all the other animations in that grouping work.

~Phil



_______________________________________________

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

_______________________________________________

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


References: 
 >[[NSView animator] setHidden:YES] doesn't fade? (From: Philip Dow <email@hidden>)

  • Prev by Date: Re: NSURL loadResourceDataNotifyingClient callbacks never called when -fobjc-gc is used
  • Next by Date: Get font name and size chosen
  • Previous by thread: Re: [[NSView animator] setHidden:YES] doesn't fade?
  • Next by thread: Newbie image resource question
  • Index(es):
    • Date
    • Thread