반응형
iOS 16 이상부터는 TextKit 2가 기본으로 사용되는데 (WWDC 21 Meet TextKit 2)
만약 TextKit 1을 사용하고자 한다면 다음과 같이 해주면 됩니다.
// how to using TextKit1 on iOS16+
let textView = UITextView(usingTextLayoutManager: false)
// how to using TextKit2 on iOS16+
let textView = UITextView(usingTextLayoutManager: true)
반응형
'iOS > Tip' 카테고리의 다른 글
@AppStorage에 Date 타입과 Array 타입 사용하기 (0) | 2023.12.04 |
---|---|
UIView -> UIImage (0) | 2023.11.15 |
iOS 16.4 이후부터 WebView 디버깅 하기 (0) | 2023.11.15 |
iOS App URL Cache 제거 (0) | 2023.11.10 |
Application의 KeyWindow 구하기 (0) | 2023.10.15 |
Left Constraint 와 Leading Constraint 의 차이점 (0) | 2023.05.31 |
Intrinsic Size (0) | 2023.05.31 |
setNeedsLayout와 setNeedsDisplay의 차이 (0) | 2023.05.31 |