• 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
Releasing a sub-view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Releasing a sub-view


  • Subject: Releasing a sub-view
  • From: Lorenzo <email@hidden>
  • Date: Wed, 28 Apr 2004 14:07:34 +0200

Hi,
I create a custom NSView
theView = [[XAView alloc] initWithFrame:theFrame];
now theView has retainCount = 1;
then I add it to a ScreenSaverView
[ssView addSubview:theView];
now theView has retainCount = 2;

when the ScreenSaverView calls
- (void)stopAnimation
{
[theView release];
[super stopAnimation];
}

theView has not been released because it has still retainCount = 1.
Anyway I see a good fade-out of the screen-saver. Instead if I call
- (void)stopAnimation
{
[theView removeFromSuperview];
[theView release];
[super stopAnimation];
}

theView has been released properly.
The problem is that when theView has been removed from the superview
I see a white flash on the screen. Then I see the fade-out.
How to avoid this annoying white flash?


Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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.


  • Follow-Ups:
    • Re: Releasing a sub-view
      • From: Jeremy Dronfield <email@hidden>
  • Prev by Date: Re: xCode 1.2
  • Next by Date: Re: iPhoto plugin source
  • Previous by thread: Re: iPhoto plugin source
  • Next by thread: Re: Releasing a sub-view
  • Index(es):
    • Date
    • Thread