Ivar ivar = class_getInstanceVariable([UITextField class], "_placeholderLabel");
UILabel* placeholderLabel =object_getIvar(_searchField, ivar);
placeholderLabel.textColor= [UIColorgrayColor];
Ivar ivar = class_getInstanceVariable([UITextField class], "_placeholderLabel");
UILabel* placeholderLabel =object_getIvar(_searchField, ivar);
placeholderLabel.textColor= [UIColorgrayColor];
本文标题:iOS 通过runtime修改占位符颜色
本文链接:https://www.haomeiwen.com/subject/axosdltx.html
网友评论