chiyun1

Results 3 comments of chiyun1

Main Thread Checker开启之后,不知道为什么会导致UIKit里UILabel一个废弃的方法被引入进来。这个方法的名字也是color。出问题时就是color实际上执行了这个方法,然后用返回的UIColor类型的值去当作block执行继而导致了崩溃。 不过同样没找到好的解决办法,项目里用color也不少,改起来真麻烦。

找到一个打补丁的办法,在项目中添加上下面的Category代码。 ```objC @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...

you can add `#include ` in this file.