tags:

views:

36

answers:

1

Hello everyone

I have a webview and want to drag the url on the webview to a textlabel. I know there is the option of 'Copy', but I prefer to do as the dragdrop function in normal computer.

Is this possible for iphone app?

Welcome any comment

Thanks

interdev

A: 

I am assuming you want to drag&drop a hyperlink from an HTML page rendered in a UIWebView control to another control on the screen.

Unfortunately I doubt that this is trivial, if at all possible. There is no documented way to find out if a UIControlEventTouchDown event received by a UIWebView object is hitting a rendered hyperlink and discover that hyperlink's URL.

If you were able to do that, you would still have to create and show a custom view that would track touchesMoved and touchesEnded to know when the user drops it, and if it falls on the intended destination control.