简体   繁体   中英

iphone sdk: how to add event to UIButton added in UIWebView

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.

Add handler:

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

Returning value:

NSString * returnValue = [WebView stringByEvaluatingJavaScriptFromString:@"SOME JAVASCRIPT"];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM