【发布时间】:2014-08-06 04:21:13
【问题描述】:
UISearchBar *searchBar = [[UISearchBar alloc] init];
[searchBar setTranslucent:NO];
searchBar.barTintColor=[UIColor colorWithRed:92.0/255.0 green:122.0/255.0 blue:178.0/255.0 alpha:1.0];
searchBar.frame = CGRectMake(0, 0, self.view.frame.size.width, 44);
self.searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar
contentsController:self];
self.searchDisplayController.searchResultsDelegate = self;
self.searchDisplayController.searchResultsDataSource = self;
self.searchDisplayController.delegate = self;
在上面的代码中,我想在 SearchBarDisplay Controller 的搜索栏中设置颜色,但我无法正确设置...请告诉我解决方案...谢谢
【问题讨论】:
标签: ios iphone ios7 uisearchbar