• 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
Core Animation vs. table/browser/matrix views - looking for advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Animation vs. table/browser/matrix views - looking for advice


  • Subject: Core Animation vs. table/browser/matrix views - looking for advice
  • From: James Bucanek <email@hidden>
  • Date: Fri, 2 Jul 2010 09:16:59 -0700

Greetings,

I'm about to undertake an almost complete rewrite of my user interface. I've made the decision to drop support for OS X 10.4, which will allow me to (finally) use Core Animation and Grand Central extensively.

Now I'm faced with how to engineer the many table, outline, browser, and matrix views I have. I have some elements of the views that are animated, and I'll want to do more. I'll especially want to animate items (i.e. rows) as single entities—–sliding the row up or down, zooming it in or out, etc.

My table views are fairly complex. Not draw not just the content of individual cells, but also background graphics (that draws shaded regions around groups of objects) and overlay graphics (that draw lines between connected/related objects).

Right now, I'm using the "trick" of having the table or browser cell create persistent NSView subviews that preform the drawing+animation for selected cells. The rest are simply drawn using traditional NSCell objects.

Now I want to migrate to Core Animation, but I know that child CALayers and NSViews don't mix. That is, an NSView will either host CALayer objects or NSView subviews, but not both. This makes working CALayers into NSTableView and NSOutlineView somewhat problematic. For example, I can't just use CALayers to draw background or highlights if some of the cells are creating NSViews to display content in the same view.

So what's the best way to construct complex table, outline, and browser views that support CA layers?

So far I've imagined two ways of approaching this:

(1) Keep with the traditional table/outline/browser view + table cell logic, creating NSView subviews objects which then host their own CALayers to provide animation.

(2) Display all table data using CALayers. Instead of drawing anything, each cell invocation would spontaneously create a CALayer for each cell in the table. Background and overlay graphics would be provide by other CALayers.

I'm sure the first will work, but it feels clunky.

The second approach has a lot of appeal, but I worry that NSTableView or NSBrowser might create hidden/secret NSView subviews that will mess everything up.

I'm sure some of you have been down this road, and I value your advice.


_______________________________________________

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


  • Prev by Date: phrase searching with SearchKit
  • Next by Date: Re: iOS4: VOIP App
  • Previous by thread: Re: phrase searching with SearchKit
  • Next by thread: Re: force rendering of views off screen
  • Index(es):
    • Date
    • Thread