user811598
user811598

Reputation: 79

Get the response from UIWebview

I am implementing an application.In that i am using the loadWithhtmstring: method to load the html in web-view using this html, i am sending the data to server after executing that method,server returns the html. So my doubt is how to get that response html.

Upvotes: 1

Views: 7540

Answers (1)

BhushanVU
BhushanVU

Reputation: 3455

Inside webViewdidFinishLoad delegate you can add

NSString *html = [webView stringByEvaluatingJavaScriptFromString: 
                                         @"document.body.innerHTML"];

It will return you html content in a NSString...

Upvotes: 6

Related Questions