Explorar o código

fix searchButton color after changeTheming

Marino Faggiana %!s(int64=7) %!d(string=hai) anos
pai
achega
9b459d00b7
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      iOSClient/Main/CCMain.m

+ 5 - 0
iOSClient/Main/CCMain.m

@@ -1647,6 +1647,11 @@
         self.searchController.searchBar.delegate = self;
         self.searchController.searchBar.backgroundColor = [NCBrandColor sharedInstance].brand;
         self.searchController.searchBar.backgroundImage = [UIImage new];
+        // 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];
+        }
         
         self.tableView.tableHeaderView = self.searchController.searchBar;
         [self.tableView setContentOffset:CGPointMake(0, self.searchController.searchBar.frame.size.height - self.tableView.contentOffset.y)];