I\'m trying to listen for an event (specifically a button click) from a webpage I have opened in a UIWebView in my iOS app. I know that in other languages there are ways to att
You can use the UIWebViewDelegate:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
The UIWebViewNavigationType values are :
enum {
UIWebViewNavigationTypeLinkClicked,
UIWebViewNavigationTypeFormSubmitted,
UIWebViewNavigationTypeBackForward,
UIWebViewNavigationTypeReload,
UIWebViewNavigationTypeFormResubmitted,
UIWebViewNavigationTypeOther
};typedef NSUInteger UIWebViewNavigationType;
Can check this and then look at the NSURLRequest to get info about that