Re: Toolbars, TableViews and Animation
Re: Toolbars, TableViews and Animation
- Subject: Re: Toolbars, TableViews and Animation
- From: "Doug Penny" <email@hidden>
- Date: Tue, 30 Oct 2007 09:37:33 -0400
On 10/30/07, Corbin Dunn <email@hidden> wrote:
>
> On Oct 30, 2007, at 6:17 AM, Doug Penny wrote:
>
> > Hi all,
> > I am running across a strange drawing bug when using animation to
> > change a views frame size and swap in a new subview. An example I
> > have come across is when working with the BasicCocoaAnimations example
> > project. You can find this project by doing a search in the developer
> > documentation. I added a tableview to the medium view in the
> > MainWindow.nib file. The tableview I added stretches almost from the
> > top to the bottom of the view. The problem comes when you run the app
> > and move from the small view to the medium view. The code figures out
> > the new size for the window and calls
> >
> > [[[self window] animator] setFrame:newFrame display:YES];
> > [[[[self window] contentView] animator] replaceSubview:previousView
> > with:view];
>
> Ah, I see you are using Leopard -- are you using layer backed views?
> (ie: CoreAnimation?)
Yes, this is in Leopard... sorry I left that out of the first post. I
am calling setWantsLayer: on the contentView of the window in
awakeFromNib:
>
> > to smoothly change the window size and fade out the old view and fade
> > in the new view. However when the window starts resizing the window,
> > the tableview seems to have problems redrawing correctly as it is
> > fading/sliding into place. It almost looks like part of the toolbar
> > is sticking to the tableview. Has anyone else come across an issue
> > like this or am I simply doing something wrong here? I would be happy
> > to send the modified project to anyone who would like to take a look.
> > Thanks for the help.
>
> I haven't tried to reproduce your problem, but one thought could be
> tableView caching the contents in "live resize". To thwart this,
> subclass NSTableView, override drawRect: and just call [super
> drawRect:]. Does that fix it?
>
> corbin
>
Gave this a try and it doesn't seem to make a difference. Thanks for
the suggestion.
Sincerely,
Doug Penny
_______________________________________________
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