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 (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to