Take the 2-minute tour ×

i've a button in webview without setting event handler.how to set eventhandler for it and how to call this function in javascript and how to bring javascript value to objective c. plz give me some suggesstions.

share|improve this question
add comment

1 Answer

Add handler:

[button addTarget:self action:@selector(SOME SEL) forControlEvents:UIControlEventTouchUpInside];

Returning value:

NSString * returnValue = [WebView stringByEvaluatingJavaScriptFromString:@"SOME JAVASCRIPT"];
share|improve this answer
add comment

Your Answer


