//设置placeHolder的颜色
<span style="font-size:18px;"> UIColor *color = [UIColor whiteColor];
self.attributedPlaceholder = [[NSAttributedStringalloc] initWithString:@"请输入用户名" attributes:@{NSForegroundColorAttributeName: color}];</span>
注:self就是定义的UITextField。