Search Results

Search found 2 results on 1 pages for 'argman'.

Page 1/1 | 1 

  • iPhone: How to Display Text from UIWebView HTML Document in a UITextView

    - by ArgMan
    I have an RSS feed that gets arranged in a UITableView which lets the user select a story that 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): I have tried using: NSString *myText = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.textContent"]; and assigning the string to a UILabel but it doesn't work from where I am implementing it in webViewDidFinishLoad (--is that not the proper place?). 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 displays the text fine. The problem arises when I try to process the RSS feed . 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? Thank you very much in advance!

    Read the article

  • 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!

    Read the article

1