Skip to content

Commit 0669aac

Browse files
committed
move the searchbar appearance to the app delegate
1 parent a1b4988 commit 0669aac

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Mage/AppDelegate.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
8585
[self startMageApp];
8686
}
8787

88+
if (@available(iOS 13.0, *)) {
89+
} else {
90+
[[UITextField appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTextColor:[UIColor whiteColor]];
91+
}
92+
8893
return YES;
8994
}
9095

Mage/EventChooserController.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ - (void) themeDidChange:(MageTheme)theme {
8282

8383
if (@available(iOS 13.0, *)) {
8484
self.searchController.searchBar.searchTextField.backgroundColor = [[UIColor background] colorWithAlphaComponent:.87];
85-
} else {
86-
[[UITextField appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTextColor:[UIColor navBarPrimaryText]];
8785
}
8886

8987
[self.tableView reloadData];
@@ -104,11 +102,6 @@ - (void) viewDidLoad {
104102
self.searchController.searchBar.translucent = YES;
105103
self.searchController.delegate = self;
106104

107-
if (@available(iOS 13.0, *)) {
108-
} else {
109-
self.searchController.searchBar.barStyle = UIBarStyleBlack;
110-
}
111-
112105
self.refreshingButton.layer.shadowRadius = 3.0f;
113106
self.refreshingButton.layer.shadowColor = [UIColor blackColor].CGColor;
114107
self.refreshingButton.layer.shadowOffset = CGSizeMake(0.0f, 1.0f);

0 commit comments

Comments
 (0)