【发布时间】:2016-11-12 07:01:03
【问题描述】:
我使用下面的代码来更改 UISearchBar 文本字段的背景颜色。
[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setDefaultTextAttributes:@{
NSForegroundColorAttributeName : [UIColor redColor],
NSFontAttributeName : [UIFont systemFontOfSize:15]
}];
但这对我不起作用,任何人都可以提供解决方案。 提前致谢
【问题讨论】:
-
您能否添加更多信息“它对我不起作用”非常模糊。
-
你能举个例子在uisearchbar中设置文本字段背景颜色
标签: objective-c ios8