[英]showing Html content in textview
我必須在textview中顯示html字符串,而不是在uiwebview中顯示。 因為我必須編輯html字符串的內容。
例如:
NSString * data =“ <br>要顯示的數據<\\ br>”
textview.text =數據;
可能嗎? 在此先感謝您的建議
問候,sathish
像這樣 ?
UITextView * text = [[UITextView alloc] initWithFrame: CGRectMake( 0.0f , 0.0f, 100.0f, 150.0f)];
text.font = [UIFont systemFontOfSize:18];
text.backgroundColor = [UIColor clearColor];
[text setValue:@"<b>big</b><br>blah blah" forKey:@"contentToHTMLString"];
[text sizeToFit];
[imageButton addSubview:text];
當然,您可以顯示HTML文本,但是它將僅顯示為純文本源。 UITextView不支持任何“豐富的編輯”或開箱即用的顯示。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.