• 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: Custom Views and Dragging ... [ with attitude ]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Views and Dragging ... [ with attitude ]


  • Subject: Re: Custom Views and Dragging ... [ with attitude ]
  • From: J Nozzi <email@hidden>
  • Date: Wed, 21 Apr 2004 23:33:53 -0400

On Apr 21, 2004, at 11:21 PM, m wrote:


What the responder was driving at was that in Cocoa, what appears to the user as "dragging a view" is not in fact dragging a view. You're creating the illusion of dragging a view. What you're really doing is dragging an image and after the drop, modifying the view hierarchy yourself.

If you really must actually drag a view from one view to another, you'll need to roll your own solution.


Thank you. Succinct, and not parroted. ;-) So the way it should go is something like: "user begins dragging custom view, custom view 'image' is created for use with drag operation, drag operation receiver handles things like the 'plus' cursor and possibly moves other custom views out of the way (a la iMovie), and accepts the drop, the custom view is 'removed' from the sending superview then added to the target/receiving superview."

Is that about right? If so, does anybody have a clean example project that does just this? I like clean examples that don't combine other 'tricks' into one - it just makes it easier to grasp the subject you're trying to learn when there's nothing else mixed in. ;-)


What you're talking about here is constraining the position of the image that represents the data being dragged. Again, this isn't supported by Cocoa drag-n-drop; you'll need to roll your own solution.

Any idea how iMovie might do this? Specifically, the timeline's constraint? Though I appear to be on the right track with the previously-mentioned topics, I have no idea where to even begin with this constraint issue. For instance, would I start with drag-and-drop and *modify* this or is there no hope and must I 'roll my own' drag-and drop solution as a whole? The latter, of course, is quite discouraging.

- J
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Custom Views and Dragging ... [ with attitude ]
      • From: m <email@hidden>
References: 
 >Custom Views and Dragging ... (From: J Nozzi <email@hidden>)
 >Re: Custom Views and Dragging ... (From: Allan Odgaard <email@hidden>)
 >Re: Custom Views and Dragging ... [ with attitude ] (From: J Nozzi <email@hidden>)

  • Prev by Date: Re: Custom Views and Dragging ... [ with attitude ]
  • Next by Date: [Moderator] Re: Custom Views and Dragging ... [ with attitude ]
  • Previous by thread: Re: Custom Views and Dragging ... [ with attitude ]
  • Next by thread: Re: Custom Views and Dragging ... [ with attitude ]
  • Index(es):
    • Date
    • Thread