_rightTF.placeholder = @"请输入注册时的手机号码";
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
dict[NSForegroundColorAttributeName] = [UIColor colorWithRed:25/255.0 green:158/255.0 blue:253/255.0 alpha:0.4];
NSAttributedString *attr = [[NSAttributedString alloc] initWithString:_rightTF.placeholder attributes:dict];
[_rightTF setAttributedPlaceholder: attr];
[_rightTF setValue:[UIFont boldSystemFontOfSize:15 * HomePageDefineWidth] forKeyPath:@"_placeholderLabel.font"];
设置UItextfiled的placehold的颜色和大小
最新推荐文章于 2019-04-15 18:14:00 发布