• 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 setHidden vs. setTransparent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView setHidden vs. setTransparent


  • Subject: Re: NSView setHidden vs. setTransparent
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 19 Mar 2004 01:06:59 -0500

On Mar 18, 2004, at 6:39 PM, Daniel Todd Currie wrote:


Then to hide, use:

if([myButton superview]) [myButton removeFromSuperview];


Be sure to retain that button if you intend to reuse it.

And to show, use:

if(![myButton superview]) [buttonSuperview addSubview:myButton];

You need to increase the retain count of myButton in awakeFromNib, since -removeFromSuperview: will drop the retain count. Therefore, be sure to release myButton on quit.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSView setHidden vs. setTransparent (From: "Huyler, Christopher M" <email@hidden>)
 >Re: NSView setHidden vs. setTransparent (From: Daniel Todd Currie <email@hidden>)

  • Prev by Date: Re: Autorelease pools?
  • Next by Date: Re: NSImage buggy when scaling images above real size?
  • Previous by thread: Re: NSView setHidden vs. setTransparent
  • Next by thread: Re: NSView setHidden vs. setTransparent
  • Index(es):
    • Date
    • Thread