解决Xcode11.2在xib里加载UITextView导致崩溃

#import

在AppDelegate.m:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
.....
 
if (@available(iOS 13.2, *)) {
     
        }
        else {
            const char *className = "_UITextLayoutView";
            Class cls = objc_getClass(className);
            if (cls == nil) {
                cls = objc_allocateClassPair([UIView class], className, 0);
                objc_registerClassPair(cls);
    #if DEBUG
                printf("added %s dynamically\n", className);
    #endif
            }
        }
 
return YES;

}

重新编译问题解决。

参考链接:https://blog.csdn.net/tiberx/article/details/102971239

你可能感兴趣的:(解决Xcode11.2在xib里加载UITextView导致崩溃)