-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XCode11.4 模拟器iPhone8 Demo闪退 Thread 1: EXC_BAD_ACCESS #16
Comments
你也遇到这问题了? |
遇到同样的问题 xcode 11.5 真机13.5 |
找到一个打补丁的办法,在项目中添加上下面的Category代码。 @interface UILabel (fixColorBug)
@end
@implementation UILabel(fixColorBug)
+ (void)load
{
Method method = class_getInstanceMethod([self class], @selector(color));
Method methodNew = class_getInstanceMethod([self class], @selector(fcb_color));
method_exchangeImplementations(method, methodNew);
}
- (id)fcb_color{
id color = [self fcb_color];
if (color == nil || [color isKindOfClass:[UIColor class]]) {
//deprecated method
return ^(id color){
self.textColor = Color(color);
return self;
};
}else{
return color;
}
}
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
xcode11.4, 启动就会闪退。 经过试验,确定是UILabel+NERChainable 中的color属性问题。
只要label调用color 就会闪退。直接报内存泄漏。
把color的名字换一个,就可以运行了。但项目使用color处较多,期望朋友看到帮忙查查问题。
The text was updated successfully, but these errors were encountered: