浏览代码

fix searchButton color after changeTheming

Marino Faggiana 7 年之前
父节点
当前提交
0993b91891
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      iOSClient/Main/CCMain.m

+ 6 - 1
iOSClient/Main/CCMain.m

@@ -317,7 +317,12 @@
     // color searchbar
     // color searchbar
     self.searchController.searchBar.barTintColor = [NCBrandColor sharedInstance].brand;
     self.searchController.searchBar.barTintColor = [NCBrandColor sharedInstance].brand;
     self.searchController.searchBar.backgroundColor = [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
     // Title
     [self setTitle];
     [self setTitle];