FROM : Scott Anguish
DATE : Mon Mar 10 23:40:27 2008
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_removed>)
>
> 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/<email_removed>
>
> This email sent to <email_removed>
DATE : Mon Mar 10 23:40:27 2008
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_removed>)
>
> 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/<email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Jonathan Dann | Mar 10, 20:52 | |
| Jonathan Dann | Mar 10, 21:35 | |
| Scott Anguish | Mar 10, 23:40 | |
| Jonathan Dann | Mar 11, 21:13 |






Cocoa mail archive

