On Apr 14, 2012, at 1:31 AM, Quincey Morris wrote: > 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. > >
Thanks for the reply, Quincey. Indeed there is an NSTableViewAnimationEffectGap constant, and I use it in my current implementation. However, unless I've missed something, it is only used to create a animated gap after the mouse button is released to complete the drag, while the dragged item "flies" into place. Instead, I'm hoping to make it so that the gap opens up during the drag, and that its position changes as the user moves the dragged item around (as shown in the GarageBand video I linked to). Thanks, Andrew _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com