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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]