user3214012
user3214012

Reputation: 43

How to display HTML data in UITextview or UIView in ios

How to display html data in UITextview or uiview.This is my html data

{\"id\":\"4\",\"title\":\"Predictions proved correct in the year 2013\",\"description\":\"<\/font> Financial system in America for this year is not indicated progress this year too. More problems will creep up. \r\n<\/font> Aggressive stage of Telangaana agitation- formation of seperate Telangaana state- bifurcation of state - sure indications are \r\n\r\npredicted. \r\n*<\/font> Bad days for congress party was predicted long back. The same situations will continue. \r\n*<\/font> The Gujarath CM - Sri Narendra Modi - Bright future is indicated. ( Care should be taken on health aspects). \r\n*<\/font> Still danger is indicated for Indoneshia and Sumitra Islands. \r\n*<\/font> Man is weak before nature. Proved again and again.\r\nEarthquakes, Earth movement, merceless sun, oceans\/seas through out the world causing havocs, hub for disputes, falling of meteriorids, water havocs\r\n- are indicated. --- Prayers to Gods, Bhoosuktam chanting, --- Following of rites are needed.}

i want to display like this in UITextview or UIView.

using Json parser how get the html data and how to display response data in UITextview or uiview.please help me any body.Thanks in advance.

Upvotes: 1

Views: 1065

Answers (2)

iPatel
iPatel

Reputation: 47099

YES you can parse HTML content of file.

If you want to get specific value from HTML content you need to Parce HTML content by using Hpple. Also This is documentation with exmple that are is for parse HTML. Another way is rexeg but it is more complicated so this is best way in your case.

Upvotes: 0

Douglas Hill
Douglas Hill

Reputation: 1547

Have a look at UIWebView — a subclass of UIView — and its method loadHTMLString:baseURL:. You might also find NSJSONSerialization helpful.

Upvotes: 2

Related Questions