根据bugly反馈的信息我查看代码看到:
[self.searchTF setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
这段代码的意思是设置textField文字的默认颜色。iOS13以后就不能这样写了,应该这样写:
Ivar ivar = class_getInstanceVariable([UITextField class], "_placeholderLabel");
UILabel *placeholderLabel = object_getIvar(self.searchTF, ivar);
placeholderLabel.textColor = [UIColor whiteColor];