Window Animation with setFrame:display:animate: Flickers
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