【发布时间】:2018-04-24 07:59:58
【问题描述】:
我想出了如何使 UITextField 透明,但我现在需要将占位符文本设置为白色。这可能吗?提前感谢您的帮助!
【问题讨论】:
标签: storyboard uitextfield xcode9
我想出了如何使 UITextField 透明,但我现在需要将占位符文本设置为白色。这可能吗?提前感谢您的帮助!
【问题讨论】:
标签: storyboard uitextfield xcode9
试试这个:
UIColor *color = [UIColor whiteColor];
textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholderText attributes:@{NSForegroundColorAttributeName: color}];
【讨论】: