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
) to the webview to show the content
this is the function
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
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;
}