Getting current selection in objective c using WebKit framework?
Is there any method available in WebKit framework which tells that user has clicked on a particular button of the the web page or user clicked on 开发者_开发百科some link.I want to perform some action when user clicks on a button of a webpage,but i am not able to identify that that user clicked on a button.I searched a lot but i am not able to find such method.Please help!
Set the UI delegate and the policy delegate via [webView setUIDelegate:]
and [webView setPolicyDelegate:]
, and implement the delegate methods explained in Web UI delegate protocol reference and in Web Policy delegate protocol reference.
Look for webView:mouseDidMoveOverElement:modifierFlags:
in the UI delegate and webView:decidePolicyForNavigationAction:request:frame:decisionListener:
in the policy delegate to achieve what you want to do.
精彩评论