iOS/swift
_UITextLayoutView 라는클래스가 없다!
wiwi_
2019. 11. 5. 15:39
'Could not instantiate class named _UITextLayoutView because no class named _UITextLayoutView was found;
라는 오류 메시지가 뜨면서 앱이 튕긴다.
After upgrading to Xcode 11.2 from Xcode 11.1, app crashes due to _UITextLayoutView
After upgrading to Xcode 11.2 from Xcode 11.1 app crashes: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named
stackoverflow.com
에서 해당 문제 상황에 대한 해결책이 제시되었다
import UIKit
@objc
class UITextViewWorkaround : NSObject {
static func executeWorkaround() {
if #available(iOS 13.2, *) {
} else {
let className = "_UITextLayoutView"
let theClass = objc_getClass(className)
if theClass == nil {
let classPair: AnyClass? = objc_allocateClassPair(UIView.self, className, 0)
objc_registerClassPair(classPair!)
}
}
}
}
해당 클래스를 작성한후
Appdelegate 에 application( didFinishLaunchingWithOptions ) 항목에서
executeWorkaround() 를 실행시켜주면 이상없이 동작한다!
추가로 xcode 업데이트로 해당문제는 해결될것으로 보인다.
우선은 추가...
반응형