uitextview 내부에 텍스트에 프로그래밍 방식으로 밑줄을 긋는 방법은 무엇입니까?uitextview 내부에 밑줄 텍스트
1
A
답변
0
이 목적으로 NSAttributedString을 사용할 수 있습니다. 다음은 같은 링크입니다 - https://github.com/AliSoftware/Ali-Cocoa-Classes
그리고 NSAttributedString 사용 방법을 확인하려면이 스레드를 참조 할 수 있습니다. How do you use NSAttributedString?
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];
관련 문제
- 1. 밑줄 텍스트
- 2. 텍스트 밑줄 여백
- 3. DataTemplate에있는 Label의 밑줄 텍스트
- 4. iPhone : 밑줄 텍스트
- 5. sifr의 밑줄 텍스트
- 6. 밑줄 텍스트 뷰
- 7. UITextView 텍스트 블리딩 효과
- 8. UITextView 일부 텍스트 숨기기
- 9. UITextView - 선택한 텍스트 수정
- 10. UITextView UIAlertView의 큰 텍스트
- 11. UITextView 소스 텍스트 변경
- 12. UITextView 서식있는 텍스트?
- 13. UITextView 텍스트 조작
- 14. iphone UitextView 텍스트 잘림
- 15. UITextView 개요 텍스트
- 16. UITextView 선택한 텍스트 점
- 17. MySQL 전체 텍스트 색인 밑줄
- 18. xcode에서 밑줄 친 텍스트 만들기
- 19. 입력하는 동안 UITextView 텍스트 숨기기
- 20. UITextView 개체 외부에서 텍스트 스크롤
- 21. UITextView 및 UITextField 텍스트 흐리게지고있다
- 22. UITextView 페이징 사용 텍스트 잘림
- 23. UITextView 대신의 수를 반환 텍스트
- 24. Iphone SDK UITextView 텍스트 길이
- 25. 애니메이션으로 UITextView 텍스트 색상 변경
- 26. iOS UITextView 텍스트 강조 표시
- 27. UITextView 새 줄에 텍스트 추가
- 28. uitextview 반복하여 텍스트 단추를 삭제합니다.
- 29. 밑줄
- 30. 밑줄 cont
은 내가 NSForegroundColorAttributeName를 사용하기위한 선언되지 않은 오류가 발생합니다. pls 알려주세요 – user198725878