Browse Source

fix searchButton color after changeTheming

Marino Faggiana 7 years ago
parent
commit
0993b91891
1 changed files with 6 additions and 1 deletions
  1. 6 1
      iOSClient/Main/CCMain.m

+ 6 - 1
iOSClient/Main/CCMain.m

@@ -317,7 +317,12 @@
     // color searchbar
     self.searchController.searchBar.barTintColor = [NCBrandColor sharedInstance].brand;
     self.searchController.searchBar.backgroundColor = [NCBrandColor sharedInstance].brand;
-
+    // color searchbbar button text (cancel)
+    UIButton *searchButton = self.searchController.searchBar.subviews.firstObject.subviews.lastObject;
+    if (searchButton && [searchButton isKindOfClass:[UIButton class]]) {
+        [searchButton setTitleColor:[NCBrandColor sharedInstance].brandText forState:UIControlStateNormal];
+    }
+    
     // Title
     [self setTitle];