I'm working on a app which will use a uiwebview to submit a form.
I wonder if it's possible to catch the post and parameters then reuse them to set a calendar event for ex.
I mean :
- fill the form (in webview)
- submit the form (in webview)
- catch form parameters and fill calendar event (native iphone framework).
Is it possible ?
Thanks in advance for any help.
Set the delegate for the
UIWebView to your view controller, then implement the
webView:shouldStartLoadWithRequest:navigationType: method of the
UIWebViewDelegate protocol. you can return NO from that to stop the actual page load and use it to grab the attempted web request.
I think that will do what you want.
Try overriding method in your UIWebViewDelegate
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
It is send before a web view begins loading content. From request you should be able to get post parameters