Reputation: 493
How can one obtain the title of an webpage shown in UIWebview?
In addition, are there any way of detecting subtitles within the text in a block of text in UIWebview?
Alternatively, are there any way of identifying if a string is bold/italic/underlined? Or is that not stored?
Upvotes: 0
Views: 285
Reputation: 2459
You can use javascript
For the first question
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
NSLog(@"title %@",[webView stringByEvaluatingJavaScriptFromString:@"document.title"]);
}
Upvotes: 1