Re: Opening a gap in NSTableView during drag and drop
Re: Opening a gap in NSTableView during drag and drop
- Subject: Re: Opening a gap in NSTableView during drag and drop
- From: Quincey Morris <email@hidden>
- Date: Sat, 14 Apr 2012 00:31:36 -0700
On Apr 13, 2012, at 08:02 , Andrew Madsen wrote:
> I've got a simple, single-column, view-based NSTableView with items in it that can be dragged to reorder them. During drag and drop, I'd like to make it so that a gap for the item-to-be-dropped opens up at the location under the mouse. GarageBand does something like this when you drag to reorder tracks (video here: http://www.screencast.com/t/OmUVHcCNSl). As far as I can tell, there's no built in support for this in NSTableView.
I believe there is in fact support for this in Lion's table view. See, for example, the NSTableView class reference for a description of the 'NSTableViewAnimationEffectGap' constant.
I'd also recommend you watch the 2011 WWDC video on this topic. IIRC there was a demo of this particular animation, and if you're lucky there will be some sample code in the slides that you can plunder.
_______________________________________________
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