//设置textField的placeholder字体的颜色,默认是灰色
UIColor *color = [UIColor whiteColor];
self.loginNumText.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入用户名" attributes:@{NSForegroundColorAttributeName: color}];
时间: 2024-10-03 22:25:20