• 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: Toolbars, TableViews and Animation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toolbars, TableViews and Animation


  • Subject: Re: Toolbars, TableViews and Animation
  • From: Corbin Dunn <email@hidden>
  • Date: Tue, 30 Oct 2007 06:25:23 -0700


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


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
_______________________________________________

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: Toolbars, TableViews and Animation
      • From: "Doug Penny" <email@hidden>
References: 
 >Toolbars, TableViews and Animation (From: "Doug Penny" <email@hidden>)

  • Prev by Date: Toolbars, TableViews and Animation
  • Next by Date: Re: Beware of hidden NSTableView columns in Leopard (user defaults name clash)
  • Previous by thread: Toolbars, TableViews and Animation
  • Next by thread: Re: Toolbars, TableViews and Animation
  • Index(es):
    • Date
    • Thread