UITextField * _myTitle = [[UITextFieldalloc] init];
[_myTitlebecomeFirstResponder];
//设置键盘颜色
_myTitle.tintColor = [UIColorwhiteColor];
//设置占位文字颜色
[_myTitlesetValue:[UIColorwhiteColor]forKeyPath:@"_placeholderLabel.textColor"];
本文介绍如何使用 UITextField 进行自定义样式设置,包括设置键盘颜色和占位文字颜色的方法。
UITextField * _myTitle = [[UITextFieldalloc] init];
[_myTitlebecomeFirstResponder];
//设置键盘颜色
_myTitle.tintColor = [UIColorwhiteColor];
//设置占位文字颜色
[_myTitlesetValue:[UIColorwhiteColor]forKeyPath:@"_placeholderLabel.textColor"];

被折叠的 条评论
为什么被折叠?