|
@@ -91,6 +91,12 @@
|
|
|
self.title = titleValue;
|
|
|
|
|
|
_searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
|
|
|
+ UINavigationBar *navBar = self.navigationController.navigationBar;
|
|
|
+ if (SYSTEM_RUNS_IOS7_OR_LATER)
|
|
|
+ _searchBar.barTintColor = navBar.barTintColor;
|
|
|
+ _searchBar.tintColor = navBar.tintColor;
|
|
|
+ _searchBar.translucent = navBar.translucent;
|
|
|
+ _searchBar.opaque = navBar.opaque;
|
|
|
_searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:_searchBar contentsController:self];
|
|
|
_searchDisplayController.delegate = self;
|
|
|
_searchDisplayController.searchResultsDataSource = self;
|