iOS 13中setValue: forKey运行报错

2020-03-09  本文已影响0人  kendi_66

iOS不允许valueForKey、setValue: forKey获取和设置私有属性,需要使用其它方式修改

_phoneTF.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"手机号" attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:Main_WidthPhx(30)],NSForegroundColorAttributeName:[UIColor whiteColor]}];

参考文章https://www.jianshu.com/p/973a00f57c6b

上一篇 下一篇

猜你喜欢

热点阅读