Question

I'm using the full Readability API Parser, but a bit of a newcomer. Once I get the response back, I get the raw contents of the HTML.

enter image description here

My questions are:

  • Is it best to create a separate class to style this?
  • Should I use a UIWebview to display that data once styled?
  • Or can I just style it in the same viewDidLoad that I'm grabbing the contents?

NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://www.readability.com/api/content/v1/parser?url=%@/&token=xxxx", stringWeb]];

Thanks for the help, I can post any code necessary thats needed!

Was it helpful?

Solution

Well, if you are going to reuse the styling in other places in your project, it would be great to create a separate class so that you can avoid duplication of code for the same style. Otherwise you can just use style it in the same viewDidLoad, provided you have got the content from the Readability API.

You can certainly use UIWebView to display the data because it contains HTML. If you want to make it does not look like a web view, you can tweak it to remove the shadows on the top and the bottom of the web view when the web view bounces.

Or you can try to use something like DTCoreText: https://github.com/Cocoanetics/DTCoreText

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top