美文网首页
iOS 13中setValue: forKey运行报错

iOS 13中setValue: forKey运行报错

作者: kendi_66 | 来源:发表于2020-03-09 15:46 被阅读0次

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

相关文章

网友评论

      本文标题:iOS 13中setValue: forKey运行报错

      本文链接:https://www.haomeiwen.com/subject/tpypdhtx.html