How does the NY Times iPhone app do this?
- by ArgMan
Alright, I have an RSS feed that gets arranged in a UITableView and then the user selects a story and it loads in a UIWebView. However, I'd like to stop using the UIWebView and just use a UITextView or UILabel. This png is what I am trying to do (just display the various text aspects of a news story):
http://img411.imageshack.us/img411/2449/screenshot20100315at120.png
Let me start off by saying that I have tried to use the usualNSString *myText = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.textContent"];
and assign it to a UILabel, but it doesn't work the way that I am implementing it (in webViewDidFinishLoad--is that not correct?) and I get a blank textView and normal webView.
If I overlay a UITextView on top of a UIWebView on its own (that is, a webView that just loads one page), the code posted above works fine to display the text I require, but the problem arises when the RSS feed is added into the mix. Ideas and/or help, guys? I've been stuck wondering why this doesn't work as it should for a few days now. If you have a better, more efficient way of doing it then placing the code in webViewDidFinishLoad, please let me know! Does it go in my didSelectRowAtIndexPath? I'm lost here, guys.
Thank you very much in advance!