Get HTML in UITextView

前端 未结 3 1181
天涯浪人
天涯浪人 2021-02-06 05:47

I display html in UITextView by:

[self.textView setValue:@\"Content\" forKey:@\"contentToHTMLString\"];,

After edit

3条回答
  •  佛祖请我去吃肉
    2021-02-06 06:38

    According to Display html text in uitextview this question Use a UIWebView.

    Because undocumented -[UITextView setContentToHTMLString:] method. App will be rejected for using undocumented methods.

    But still you want doing this you can take a look this links Might be help:-

    https://github.com/AliSoftware/OHAttributedLabel

    https://www.cocoacontrols.com/controls/bctextview

    https://www.cocoacontrols.com/controls/egotextview

    and for doing this task with UIWebview you must look this :-

    Rich-text-editing-sample-project

提交回复
热议问题