• 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
Window Animation with setFrame:display:animate: Flickers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Window Animation with setFrame:display:animate: Flickers


  • Subject: Window Animation with setFrame:display:animate: Flickers
  • From: "K. Darcy Otto" <email@hidden>
  • Date: Fri, 20 Feb 2009 18:31:50 -0800

I have a window, and get that window to resize according to the various custom views I plop in the window. My purpose here is to (somewhat) emulate the system preferences window that grows and shrinks as necessary. The resizing works fine, but when I want to animate the resizing, there is a lot of flickering in the window. Here is the short bit of code:

[w setContentView:nil];
[w setFrame:windowFrame display:YES animate:YES];
[w setContentView:v];

... where "w" is an NSWindow, and "v" is an NSView. "windowFrame" is the recalculated window size that fits the view. So far, I have tried to solve the flickering by subclassing NSWindow and implementing the following override:

- (NSTimeInterval)animationResizeTime:(NSRect)newFrame
{
    return 1.0;
}

But while this does slow down the animation significantly, it simply makes the flickering slower.

Is there a way to use setFrame:display:animate: so that the background of the window does not flicker?

Thanks.
_______________________________________________

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


  • Follow-Ups:
    • Re: Window Animation with setFrame:display:animate: Flickers
      • From: Mike Abdullah <email@hidden>
    • Re: Window Animation with setFrame:display:animate: Flickers
      • From: "K. Darcy Otto" <email@hidden>
  • Prev by Date: Re: who does like Objective-C 2.0 "properties" dot syntax ?
  • Next by Date: Re: Window Animation with setFrame:display:animate: Flickers
  • Previous by thread: Re: who does like Objective-C 2.0 "properties" dot syntax ?
  • Next by thread: Re: Window Animation with setFrame:display:animate: Flickers
  • Index(es):
    • Date
    • Thread