On 11 Aug 2016, at 13:49, Graham Cox <graham....@bigpond.com> wrote: > I have a small app that works on Mac, and I’m further developing an iOS > version of it. > > I’m wondering what the general approach is for dragging an object from one > view to another in iOS is. On the Mac version, I simply use the usual drag > image+pasteboard approach, but on iOS this appears not to be supported. Both > of the views in question are subviews of the same window (obviously, since > iOS doesn’t have multiple windows) so that probably simplifies things. Is it > just a case of moving a CALayer belonging to a common ancestor view and then > doing whatever is needed to communicate between the views when the drag > completes? Or is there something in UIKit that handles some of that > generically? It wasn’t obvious where to look; I didn’t see anything in UIView.
Nothing specific, no. Useful tools are gesture recognizers (there is one that handles both a press-and-hold and the dragging afterwards, I think), turning off clipsToBounds on the container view sometimes also can be useful (e.g. for drag-out-to-delete). And people seem to generally add a layer shadow to the item being dragged, but beyond that you're pretty much back where you were in System 6 before the Drag Manager came around. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://stacksmith.org _______________________________________________ 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