Core Animation Choppyness
Core Animation Choppyness
- Subject: Core Animation Choppyness
- From: Jonathan Dann <email@hidden>
- Date: Mon, 10 Mar 2008 19:52:29 +0000
Hi Guys,
I have a couple of views in my app that get re-scaled by changing
their frames. When I turn on layer backing for the view, the
animation of the views' contents (a couple of NSColorWells &
NSButtons) is choppy and renders badly, but when I omit the layer-
backing activation the animation still works (why?). Can anybody tell
me what's going on? Ideally I don't want to have the views hidden
between transitions.
Here's the offending code:
- (IBAction)selectPreferencePanel:(id)sender;
{
NSView *newView = [self viewForTag:[sender tag]];
NSView *oldView = [[self.window.contentView subviews] firstObject];
self.window.title = [self windowTitleForTag:[sender tag]];
NSRect frame = [self frameForContentView:newView];
[NSAnimationContext beginGrouping];
[[self.window animator] setFrame:frame display:YES];
[[self.window.contentView animator] replaceSubview:oldView
with:newView];
[NSAnimationContext endGrouping];
}
and [[[self window] contentView] setWantsLayer:YES]; is set in -
awakeFromNib.
it's in a NSWindowController that aims to have a window that swaps
subviews of the window's contentView in and out when different toolbar
items are selected. The frameForContentView method just grabs looks
at the size the window needs to be for the new content, resizes are
only vertical as horizontal and vertical resize at the same time look
bad to me!
Thanks a lot,
Jon
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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