Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nnavick

macrumors regular
Original poster
Oct 13, 2010
100
0
Hi,
How do I take the content that the webview shows?
I wrote this function but it's working only on visual webview(IBOutlet)
and it's take a moment(or two :mad:) to the webview to show the content
this is the function

Code:
-(NSString*)IsServerResponding:(UIWebView *)BackgroundLoader:(UITextField*)Username:(UITextField*)Password:(UILabel*)Error {
   NSString *BackgroundLoaderText =[BackgroundLoader stringByEvaluatingJavaScriptFromString:@"document.documentElement.innerText"];
   if (([BackgroundLoaderText rangeOfString:@""].location == NSNotFound)&&([Username.text length]>0)&&([Password.text length]>0)) {
       Error.text=BackgroundLoaderText;
       if([BackgroundLoaderText isEqualToString:@""]) {
           return @"Server is not responding";
       }
   }
   return BackgroundLoaderText;
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.