Assembled by elders of Cocoa -Touch, I have a question for you all about drag and drop on an iPad.
I am trying to drag an element from a popover onto a base canvas. Using the UIPanGestureRecognizer class, I can detect the start of a drag and create a UIView to drag with my fingertip. My application works in landscape mode.
The problem arises when dragging through a tree under UIViews: how can I find out what I'm dragging now? When [UIApplication sharedApplication] .keyWindow is set, [UIView hitTest: withEvent:] always returns a UIDimmingView (which I did not put there). If I pass in the UIView that I created to call hitTest, I cannot detect a drop in the original popover - and therefore cannot detect the "do not drag after all" gesture.
Your hints and notes are welcome.
M.
source share