我怎样才能使UISearchDisplayController变亮而不是黑暗呢?现在我的应用程序是这样的:

而音乐应用程序是这样的(更好):

我找不到任何相关的属性或什么东西可以改变颜色。以下是我的相关代码:
UISearchBar *searchBar = [[UISearchBar alloc] init];
[searchBar setDelegate:self];
[searchBar setSearchBarStyle:UISearchBarStyleMinimal];
[searchView addSubview:searchBar];
[self setSearchBar:searchBar];
UISearchDisplayController *searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
[searchDisplayController setDelegate:self];
[searchDisplayController setSearchResultsDelegate:self];
[searchDisplayController setSearchResultsDataSource:self];
[self setSearchBarDisplayController:searchDisplayController];发布于 2013-11-13 04:41:00
尝试这样做,将UIStatusBarStyleDefault更改为StatusBarStyle &这段代码将如您所期望的那样显示。

UISearchBar *searchBar = [[UISearchBar alloc] init];
[searchBar setFrame:CGRectMake(0.0, 20.0, 320.0, 44.0)];
[searchBar setShowsCancelButton:YES];
[searchBar setTintColor:[UIColor redColor]];
[searchBar setPlaceholder:@"Search here."];
[searchBar setSearchBarStyle:UISearchBarStyleMinimal];
[searchBar setBarStyle:UIBarStyleDefault];
[self.view addSubview:searchBar];https://stackoverflow.com/questions/19945122
复制相似问题