Browse Source

Change color #721

Marino Faggiana 6 years ago
parent
commit
8816367eae

+ 15 - 1
iOSClient/Main/NCPhotosPickerViewController/NCPhotosPickerViewController.swift

@@ -47,7 +47,7 @@ class NCPhotosPickerViewController: NSObject {
         configure.maxSelectedAssets = Int(k_pickerControllerMax)
         configure.selectedColor = NCBrandColor.sharedInstance.brand
         
-        let viewController = TLPhotosPickerViewController(withTLPHAssets: { (assets) in
+        let viewController = customPhotoPickerViewController(withTLPHAssets: { (assets) in
             
             for asset: TLPHAsset in assets {
                 if asset.phAsset != nil {
@@ -76,3 +76,17 @@ class NCPhotosPickerViewController: NSObject {
         sourceViewController.present(viewController, animated: true, completion: nil)
     }
 }
+
+class customPhotoPickerViewController: TLPhotosPickerViewController {
+    
+    override func makeUI() {
+        super.makeUI()
+        
+        self.customNavItem.leftBarButtonItem?.tintColor = NCBrandColor.sharedInstance.brand
+        self.customNavItem.rightBarButtonItem?.tintColor = NCBrandColor.sharedInstance.brand
+        
+        self.titleLabel.textColor = NCBrandColor.sharedInstance.brand
+        self.subTitleLabel.textColor = NCBrandColor.sharedInstance.icon
+        self.subTitleArrowImageView.image = CCGraphics.changeThemingColorImage(self.subTitleArrowImageView.image, multiplier: 1, color: NCBrandColor.sharedInstance.icon)
+    }
+}