0

我想在搜索栏上的提示中有一个文本。我使用 XIB 来设置搜索栏。由于我想让 SearchBar 的颜色比默认值深,因此文本似乎不适应颜色的变化,而且太暗而无法阅读。在 xib 中没有设置来更改我可以看到的文本颜色。有谁知道解决这个问题吗?不是很重要,但会很好,因为我想要的颜色看起来更好。

4

1 回答 1

1
searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
searchBar.delegate = self;
searchBar.placeholder = @"Search";
searchBar.text = @"";
searchBar.autocorrectionType = UITextAutocorrectionTypeNo;
searchBar.backgroundColor = [UIColor colorWithRed:127/255.0f green:163/255.0f blue: alpha:1.0f];
于 2012-02-12T03:32:35.920 回答