2012-04-25 2 views

답변

0

이 문제를 해결하기 위해 UITextView 대신 UIWebView를 사용했습니다.

NSString *contentHtml = [NSString stringWithFormat:@"<html><head></head><body><font color=\"white\" size=\"4\"><table width=\"260px\"><tr><td align=\"left\" width=\"160px\"><u>Left:</u></td><td align=\"right\" width=\"100px\">315</td></tr></table></font></body></html>"]; 
[listWebView loadHTMLString:contentHtml baseURL:nil]; 
0
NSMutableAttributedString *attributedString = [self.textView.attributedText mutableCopy]; 
int valueToSet = kCTUnderlineStyleSingle; 
[attributedString addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInt:valueToSet] range:CGMakeRange(0, self.textView.text.length)]; 

self.textView.attributedText = attributedString; 
[attributedString release];