1

My question is: Can UIWebView import from website only plain text? Without any formatting etc? Or mayby there is another simple way to import just simple text from website into an iOS app?

Thanks for help!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Szekspir
  • 119
  • 13
  • You could use JS to get plain text after rendering, but really you should have a web service. Are you trying to rip something you shouldn't? – Wain Oct 29 '15 at 00:01
  • Nope. The aim is to make radio app + radio program. But the program from my favorite radio station is only on their webpage. – Szekspir Oct 29 '15 at 18:25

1 Answers1

0

It shouldn't be done with UIWebView.

Use an Http Connection to get page content then strip the HTML tags.

nsurlConnection Stripping

or, in the did finish loading get html and strip it then reset the webview content

- (void)webViewDidFinishLoad:(UIWebView *)webView {

[myUIWebView loadHTMLString:strripedString baseURL:nil];
}
Community
  • 1
  • 1
hasan
  • 23,815
  • 10
  • 63
  • 101
  • Change "shouldn't" to "can't". `UIWebView` is a browser. It can't be used to strip all formatting from a web page. – rmaddy Oct 28 '15 at 23:47
  • I've should say that the website is updated every day. So the content in the app should also be updated every day. – Szekspir Oct 28 '15 at 23:53