• 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: Keep track of subviews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keep track of subviews


  • Subject: Re: Keep track of subviews
  • From: Ryan Stevens <email@hidden>
  • Date: Sun, 9 Jan 2005 19:03:07 -0800

On Jan 9, 2005, at 6:10 PM, Simon alias Trax wrote:

In one of my views, through different inputs, other view objects are added as subviews.
I want these subviews to be removed from the main view after a period of time.
How do you keep track of these subviews so you can send them messages and eventually remove them and then, release them ?



I'd probably make the container view a subclass (if it's not already) and override addSubview: (and/or addSubview:positioned:relativeTo:) like this...


- (void)addSubview:(id)view
{
[super addSubview:view];
[view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:yourDelay];
}


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Keep track of subviews (From: "Simon alias Trax" <email@hidden>)

  • Prev by Date: Keep track of subviews
  • Next by Date: NSOpenPanel: Case insensitive files
  • Previous by thread: Keep track of subviews
  • Next by thread: NSOpenPanel: Case insensitive files
  • Index(es):
    • Date
    • Thread