如何用swift代码修改ios里text field 里注释文字的颜色深浅
现在的自带文字看不清楚
PHP中文网2017-04-17 14:32:21
You can try this:
[textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];
But obviously this method is not publicly supported, so it may not be effective in future versions of iOS. To be safe, don't use the default placeHolder, write a label yourself and put it there.