怎么监听iOS uiwebview上的按钮实习跳转

ImageImage

附上URL

回答:

你是说怎么监听到点击了 webView 网页上的按钮,跳转到另一个页面吗?

把 webView 的delegate设成self,然后有个回调函数:

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType

回答:

http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebViewDelegate_Protocol/index.html

shouldStartLoadWithRequest方法

以上是 怎么监听iOS uiwebview上的按钮实习跳转 的全部内容, 来源链接: utcz.com/p/185527.html

回到顶部