Re: Keep track of subviews
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