• 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: Opening a gap in NSTableView during drag and drop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening a gap in NSTableView during drag and drop


  • Subject: Re: Opening a gap in NSTableView during drag and drop
  • From: Andrew Madsen <email@hidden>
  • Date: Sat, 14 Apr 2012 09:03:06 -0600
  • Resent-date: Sat, 14 Apr 2012 09:30:36 -0600
  • Resent-from: Andrew Madsen <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: Cocoa <email@hidden>

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 (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

References: 
 >Opening a gap in NSTableView during drag and drop (From: Andrew Madsen <email@hidden>)
 >Re: Opening a gap in NSTableView during drag and drop (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Watching a variable in Xcode 4.3
  • Next by Date: Re: Xcode warns about missing protocol definition, even though @protocol is used
  • Previous by thread: Re: Opening a gap in NSTableView during drag and drop
  • Next by thread: Xcode warns about missing protocol definition, even though @protocol is used
  • Index(es):
    • Date
    • Thread