@property(nonatomic, copy) NSAttributedString *attributedPlaceholder;
NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
attributes[NSForegroundColorAttributeName] = [UIColor whiteColor];
uiTextFeild.attributedPlaceholder = [[NSAttributedString alloc]initWithString:uiTextFeild.placeholder attributes:attributes];
- 重写- (void)drawPlaceholderInRect:(CGRect)rect;
-(void)drawPlaceholderInRect:(CGRect)rect{
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
dict[NSForegroundColorAttributeName] = [UIColor whiteColor];
dict[NSFontAttributeName] = self.font;
[self.placeholder drawInRect:rect withAttributes:dict];
}
[uiTextFeild setValue:[UIColor whiteColor] forKeyPath:@"placeholderLabel.textColor"];