• 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: UIView hidden - still drawing the subviews?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIView hidden - still drawing the subviews?


  • Subject: Re: UIView hidden - still drawing the subviews?
  • From: Ricky Sharp <email@hidden>
  • Date: Tue, 17 Mar 2009 16:48:13 -0500


On Mar 17, 2009, at 4:32 PM, Jelle De Laender wrote:

I've a UIView with some subviews (most of them are UIButtons).

When I hide an UIView (setHidden:YES), I expect that the subviews are also hidden (not drawed)... but the subviews are still visible when I run my code.

How can I hide the subviews when I hide a UIView? Should I create a subclass and overwrite the setHidden: method (and recall setHidden on every subview) or is there a better way to do this?


Are you positive that your buttons are really subviews of your main view? Sounds like they are simply siblings of your view instead.

A hidden view (UIView/NSView) will always hide all its subviews; no extra coding needed.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

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: 
 >UIView hidden - still drawing the subviews? (From: Jelle De Laender <email@hidden>)

  • Prev by Date: Re: [NSTableView] How should a grid be drawn?
  • Next by Date: Incomprehensible KVC Failure!
  • Previous by thread: UIView hidden - still drawing the subviews? [SOLVED]
  • Next by thread: Incomprehensible KVC Failure!
  • Index(es):
    • Date
    • Thread