• 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
Re: Core Animation Choppyness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Animation Choppyness


  • Subject: Re: Core Animation Choppyness
  • From: Scott Anguish <email@hidden>
  • Date: Mon, 10 Mar 2008 18:40:27 -0400


On Mar 10, 2008, at 3:52 PM, Jonathan Dann wrote:

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?).

layer back animation is only required for certain types of Animatable Container animations.resizing isn't one.


fi you stop the animation of the replaceSubview... is that no longer choppy? This is one of the most expensive animations possible.

also, are all your boundaries integral?


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_______________________________________________

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

_______________________________________________

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: Core Animation Choppyness
      • From: Jonathan Dann <email@hidden>
References: 
 >Core Animation Choppyness (From: Jonathan Dann <email@hidden>)

  • Prev by Date: Small variant of NSSearchField?
  • Next by Date: Re: Small variant of NSSearchField?
  • Previous by thread: Re: Core Animation Choppyness
  • Next by thread: Re: Core Animation Choppyness
  • Index(es):
    • Date
    • Thread