ios - NSAttributedString from HTML -


I am trying to convert the HTML formatted text to a NSAttributedString Can be formatted properly UITextView I get DTCcore text that can do this, but when I run the code I get an error.

The code I am using:

  NSDT * data = [_story content data usage encoding: NSUFF 8 string encoding]; NSAttributedString * styledContent = [[NSAttributedString alloc] initWithHTMLData: data documented ribute: zero]; _bodyTextView.attributedText = Style Content;   

_storyContent is an NSString.

Error:

  [__ NSCTT type textBox]: Unknown selector sent example 0xb83b310   

How can I take content I can format and format it, so is it readable?

Sample Text:

  & lt; P & gt; 28 May, 2014 During his brief life, in 1978-2007, David Arapine Kuch completed many things, he was a scholar, he was a bachelor's degree in economics at Westminster College and Master of Public Administration at the University of Utah. At his untimely death, Kuch, who was considered the first Indian to participate in law school, was in his third year at the University of Utah. J.J. In addition to his academic achievements, Quinn has worked as a coordinator for a social justice nonprofit group, a assistant teacher in Salt Lake City and a summer camp young consultant. During law school, he worked for Legal Defender Association and the Salt Lake legal issue. & Lt; / P & gt; & Lt; P & gt; On Friday, May 30, the accomplishments of Kuchai will be celebrated in the university room on the sixth floor, at 11:30 pm by representatives of their family, the Youth Indian tribe and Utah University. During the Memorial of the Rice-Eccle Stadium, Kucha's brother, Cameron, David Arapane will announce the Cooch Endowment Scholarship Fund, which was designed to provide financial support for the members of the Utah Indian tribe who follow the path of Dawood Kuch Law School at the U.U. School. Scholarship is funded by David Kuch's family and friends. & Lt; / P & gt; & Lt; P & gt; David Aurepine Kuch was a remarkable person, his death at such a young age is a tragedy, but continues to inspire us to improve the heritage of commitment to the community, the rights and sovereignty of American Indians and for the improvement of the world for all humanity. The liberal scholarship, in their honor, will provide the students the opportunity to realize their dreams. Utah University President David Presting said. & Lt; / P & gt; & Lt; P & gt; Apart from Cameron Kuch and President David Pearling, Bob Adler, interim dean of College of Law, Gaiten Howell, chairman of the Youtube Indian Business Business Committee, and Kurt's parents Forrest and Carla Kuch, will also talk about Utah tribal drummers and singer performance Are set to & Lt; / P & gt; & Lt; P & gt; David Kuch can contribute to the David Kuch scholarship care of Utah SJ University. Quinnie College of Law Development Office, 332S 1400 East Room 101, Salt Lake City, Utah, 84112. & Lt; / P & gt;    

use the following code that I

  Code> // This is a string that lets you model NSString * html = @ "this is  bold  Can get in; // Apply some inline css nssting * styling html = [self styling html HTML: html]; NSDictionary * option = @ {NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType}; NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData: [Style HTML Dataup encoding: NSUTF8 string encoding] Option: Option document properties: zero error: NULL];    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -