iOS 设置UITextField的placeholder属性的颜色
NSDictionary *attrDict = @{NSForegroundColorAttributeName : [UIColor redColor]}; NSAttributedString *attrStr = [[NSAttributedString alloc] initWithString:textF.placeholder attributes:attrDict]; [textF setAttributedPlaceholder:attrStr];