Browse Source

add color text on NCBrandColor

Marino Faggiana 7 years ago
parent
commit
0fa1855d5f
2 changed files with 5 additions and 6 deletions
  1. 2 1
      iOSClient/Brand/NCBrand.swift
  2. 3 5
      iOSClient/Main/CCMain.m

+ 2 - 1
iOSClient/Brand/NCBrand.swift

@@ -46,7 +46,8 @@ class NCBrandColor: NSObject {
     @objc public var tableBackground:         UIColor = .white
     @objc public var transferBackground:      UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
     @objc public let nextcloud:               UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)
-    
+    @objc public var text:                    UIColor = .white
+
     override init() {
         self.brand = self.customer
     }

+ 3 - 5
iOSClient/Main/CCMain.m

@@ -516,7 +516,7 @@
 {
     _refreshControl = [UIRefreshControl new];
    
-    _refreshControl.tintColor = [UIColor whiteColor];
+    _refreshControl.tintColor = [NCBrandColor sharedInstance].text;
     _refreshControl.backgroundColor = [NCBrandColor sharedInstance].brand;
     [self setRefreshControl:_refreshControl];
     
@@ -582,7 +582,7 @@
                 label.text = _titleMain;
                 [label sizeToFit];
                 label.center = navView.center;
-                label.textColor = [UIColor whiteColor];
+                label.textColor = [NCBrandColor sharedInstance].text;
                 label.textAlignment = NSTextAlignmentCenter;
             
                 CGFloat correct = 6;
@@ -1876,10 +1876,8 @@
         self.searchController.searchBar.delegate = self;
         self.searchController.searchBar.backgroundColor = [NCBrandColor sharedInstance].brand;
         self.searchController.searchBar.backgroundImage = [UIImage new];
-        
         // Color Text "Cancel"
-        [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTintColor:[UIColor whiteColor]];
-
+        [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTintColor:[NCBrandColor sharedInstance].text];
         
         self.tableView.tableHeaderView = self.searchController.searchBar;
         [self.tableView setContentOffset:CGPointMake(0, self.searchController.searchBar.frame.size.height - self.tableView.contentOffset.y)];