- textField.placeholder = @"username is in here!";
- [textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];
- [textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
- 直接使用KVC模式,改变参数的值很方便
时间: 2024-11-05 12:29:48