marinofaggiana 5 years ago
parent
commit
1c4ccfa1c9

+ 6 - 0
iOSClient/AppDelegate.m

@@ -896,6 +896,12 @@
         NCBrandColor.sharedInstance.brandText = NCBrandColor.sharedInstance.customerText;
     }
     
+    //
+    NSInteger brandColor = [[NCUtility sharedInstance] RGBFromUIColorWithUicolorValue:NCBrandColor.sharedInstance.brand];
+    if (brandColor = 0) {
+        brandColor = [UIColor 
+    }
+    
     [[NCMainCommon sharedInstance] createImagesThemingColor];
     
     [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"changeTheming" object:nil];

+ 1 - 0
iOSClient/Networking/NCService.swift

@@ -151,6 +151,7 @@ class NCService: NSObject {
                 NCManageDatabase.sharedInstance.addCapabilities(capabilities!, account: account!)
                 
                 // ------ THEMING -----------------------------------------------------------------------
+                self.appDelegate.settingThemingColorBrand()
                 
                 /*
                 if (NCBrandOptions.sharedInstance.use_themingBackground && capabilities!.themingBackground != "") {

+ 2 - 2
iOSClient/Utility/NCUtility.swift

@@ -479,7 +479,7 @@ class NCUtility: NSObject {
         }
     }
     
-    func UIColorFromRGB(rgbValue: UInt32) -> UIColor {
+    @objc func UIColorFromRGB(rgbValue: UInt32) -> UIColor {
         return UIColor(
             red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
             green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
@@ -488,7 +488,7 @@ class NCUtility: NSObject {
         )
     }
     
-    func RGBFromUIColor(uicolorValue: UIColor) -> UInt32 {
+    @objc func RGBFromUIColor(uicolorValue: UIColor) -> UInt32 {
         
         var red: CGFloat = 0, green: CGFloat = 0, blue: CGFloat = 0, alpha: CGFloat = 0