Browse Source

clear code

Marino Faggiana 8 years ago
parent
commit
7fe9a53774
32 changed files with 40 additions and 55 deletions
  1. 10 12
      Nextcloud.xcodeproj/project.pbxproj
  2. 16 0
      iOSClient/Brand/NCBrand.swift
  3. 0 30
      iOSClient/Brand/NCBrandImages.h
  4. 0 1
      iOSClient/CCGlobal.h
  5. 1 0
      iOSClient/CCStandardImages.h
  6. 0 0
      iOSClient/Images.xcassets/backgroundDetail.imageset/Contents.json
  7. 0 0
      iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite.png
  8. 0 0
      iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite@2x.png
  9. 0 0
      iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite@3x.png
  10. 0 0
      iOSClient/Images.xcassets/loginLogo.imageset/Contents.json
  11. 0 0
      iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin.png
  12. 0 0
      iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin@2x.png
  13. 0 0
      iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin@3x.png
  14. 0 0
      iOSClient/Images.xcassets/menuMoreImage.imageset/Contents.json
  15. 0 0
      iOSClient/Images.xcassets/menuMoreImage.imageset/MoreBackground@2x.jpg
  16. 0 0
      iOSClient/Images.xcassets/navigationLogo.imageset/Contents.json
  17. 0 0
      iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller.png
  18. 0 0
      iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller@2x.png
  19. 0 0
      iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller@3x copia.png
  20. 0 0
      iOSClient/Images.xcassets/navigationLogoOffline.imageset/Contents.json
  21. 0 0
      iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline.png
  22. 0 0
      iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline@2x.png
  23. 0 0
      iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline@3x.png
  24. 1 1
      iOSClient/Login/CCLogin.m
  25. 1 1
      iOSClient/Main/CCDetail.m
  26. 3 3
      iOSClient/Main/CCMain.m
  27. 1 1
      iOSClient/Main/CCMore.swift
  28. 2 1
      iOSClient/Move/CCMove.m
  29. 1 1
      iOSClient/Settings/CCManageCryptoCloudSecurity.m
  30. 1 1
      iOSClient/Settings/CCSettings.m
  31. 1 1
      iOSClient/Utility/CCUtility.h
  32. 2 2
      iOSClient/Utility/CCUtility.m

+ 10 - 12
Nextcloud.xcodeproj/project.pbxproj

@@ -320,10 +320,10 @@
 		F769D39A1E9E1506006DBBB4 /* CCLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = F769D3961E9E1506006DBBB4 /* CCLocalStorage.m */; };
 		F769D39B1E9E1506006DBBB4 /* CCLocalStorageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F769D3981E9E1506006DBBB4 /* CCLocalStorageCell.m */; };
 		F769D39C1E9E1506006DBBB4 /* CCLocalStorageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F769D3991E9E1506006DBBB4 /* CCLocalStorageCell.xib */; };
-		F76B3CCE1EAE01BD00921AC9 /* NCBrandColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrandColor.swift */; };
-		F76B3CCF1EAE01BD00921AC9 /* NCBrandColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrandColor.swift */; };
-		F76B3CD01EAE01BD00921AC9 /* NCBrandColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrandColor.swift */; };
-		F76B3CD11EAE01BD00921AC9 /* NCBrandColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrandColor.swift */; };
+		F76B3CCE1EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
+		F76B3CCF1EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
+		F76B3CD01EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
+		F76B3CD11EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
 		F77B0DF01D118A16002130FE /* UIImage+Resizing.m in Sources */ = {isa = PBXBuildFile; fileRef = F70F04CA1C889184008DAB36 /* UIImage+Resizing.m */; };
 		F77B0DF21D118A16002130FE /* CCUploadFromOtherUpp.m in Sources */ = {isa = PBXBuildFile; fileRef = F7956FCA1B4886E60085DEA3 /* CCUploadFromOtherUpp.m */; };
 		F77B0DF41D118A16002130FE /* CCMain.m in Sources */ = {isa = PBXBuildFile; fileRef = F70211FB1BAC56E9003FC03E /* CCMain.m */; };
@@ -1430,7 +1430,7 @@
 		F769D3971E9E1506006DBBB4 /* CCLocalStorageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLocalStorageCell.h; sourceTree = "<group>"; };
 		F769D3981E9E1506006DBBB4 /* CCLocalStorageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCLocalStorageCell.m; sourceTree = "<group>"; };
 		F769D3991E9E1506006DBBB4 /* CCLocalStorageCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCLocalStorageCell.xib; sourceTree = "<group>"; };
-		F76B3CCD1EAE01BD00921AC9 /* NCBrandColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCBrandColor.swift; sourceTree = "<group>"; };
+		F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCBrand.swift; sourceTree = "<group>"; };
 		F76C3B831C6388BC00DC4301 /* CCGraphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGraphics.h; sourceTree = "<group>"; };
 		F76C3B841C6388BC00DC4301 /* CCGraphics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCGraphics.m; sourceTree = "<group>"; };
 		F76C3B871C638A4C00DC4301 /* CCError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCError.h; sourceTree = "<group>"; };
@@ -1513,7 +1513,6 @@
 		F7C0F46F1C8880540059EC54 /* ShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ShareViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
 		F7C1CDCE1E6DFAD1005D92BE /* CCStandardImages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCStandardImages.h; sourceTree = "<group>"; };
 		F7C1CDDA1E6DFC6F005D92BE /* NCBrandConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NCBrandConstant.h; sourceTree = "<group>"; };
-		F7C1CDDB1E6DFC6F005D92BE /* NCBrandImages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NCBrandImages.h; sourceTree = "<group>"; };
 		F7C1D8BB1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/BKPasscodeView.strings; sourceTree = "<group>"; };
 		F7C1D8BC1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
 		F7C1D8BD1D47781C00B89DEA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@@ -3094,8 +3093,7 @@
 			children = (
 				F7C742D31E7BD36600D9C973 /* Supporting Files */,
 				F7C1CDDA1E6DFC6F005D92BE /* NCBrandConstant.h */,
-				F7C1CDDB1E6DFC6F005D92BE /* NCBrandImages.h */,
-				F76B3CCD1EAE01BD00921AC9 /* NCBrandColor.swift */,
+				F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */,
 			);
 			path = Brand;
 			sourceTree = "<group>";
@@ -3991,7 +3989,7 @@
 				F7145A041D12E3B700CAFEEC /* CCloadItemData.swift in Sources */,
 				F708CF951E56E8CC00271D8B /* TableAutomaticUpload+CoreDataProperties.m in Sources */,
 				F73CC07F1E813DFF006E3047 /* BKTouchIDSwitchView.m in Sources */,
-				F76B3CCF1EAE01BD00921AC9 /* NCBrandColor.swift in Sources */,
+				F76B3CCF1EAE01BD00921AC9 /* NCBrand.swift in Sources */,
 				F73CC0761E813DFF006E3047 /* BKPasscodeViewController.m in Sources */,
 				F7145A081D12E3B700CAFEEC /* PPCollectionViewCell.m in Sources */,
 				F7145A0D1D12E3B700CAFEEC /* NSData+Base64.m in Sources */,
@@ -4057,7 +4055,7 @@
 				F74344631E127D79001CC831 /* CCBKPasscode.m in Sources */,
 				F708CF8A1E56E8CC00271D8B /* TableShare+CoreDataProperties.m in Sources */,
 				F74344661E127E35001CC831 /* CCCoreData.m in Sources */,
-				F76B3CD01EAE01BD00921AC9 /* NCBrandColor.swift in Sources */,
+				F76B3CD01EAE01BD00921AC9 /* NCBrand.swift in Sources */,
 				F73CC0801E813DFF006E3047 /* BKTouchIDSwitchView.m in Sources */,
 				F743447C1E127EB2001CC831 /* NSString+TruncateToWidth.m in Sources */,
 				F708CF751E56E8CC00271D8B /* TableLocalFile+CoreDataClass.m in Sources */,
@@ -4073,7 +4071,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				F74344251E1264EE001CC831 /* FileProvider.swift in Sources */,
-				F76B3CD11EAE01BD00921AC9 /* NCBrandColor.swift in Sources */,
+				F76B3CD11EAE01BD00921AC9 /* NCBrand.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -4250,7 +4248,7 @@
 				F7659A2E1DC0B72F004860C4 /* EARestrictedScrollView.m in Sources */,
 				F77B0E741D118A16002130FE /* CCBancomat.m in Sources */,
 				F77B0E7B1D118A16002130FE /* CCPassaporto.m in Sources */,
-				F76B3CCE1EAE01BD00921AC9 /* NCBrandColor.swift in Sources */,
+				F76B3CCE1EAE01BD00921AC9 /* NCBrand.swift in Sources */,
 				F7B1FBC91E72E3D1001781FE /* SwiftWebVCActivityChrome.swift in Sources */,
 				F7F06EA51DBFACC600099AE9 /* CTAssetItemViewController.m in Sources */,
 				F762CB8A1EACB81000B38484 /* REMenuItemView.m in Sources */,

+ 16 - 0
iOSClient/Brand/NCBrandColor.swift → iOSClient/Brand/NCBrand.swift

@@ -53,3 +53,19 @@ class NCBrandColor: NSObject {
     public var transferBackground:      UIColor = UIColor(red: 178.0/255.0, green: 244.0/255.0, blue: 258.0/255.0, alpha: 0.1)
     public var windowTintcolor:         UIColor = UIColor(red: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 1.0)    // BLU NC : #0082c9
 }
+
+class NCBrandImages: NSObject {
+
+    static let sharedInstance: NCBrandImages = {
+        let instance = NCBrandImages()
+        return instance
+    }()
+    
+    public var login:                   String = "loginLogo"
+    public var navigationLogo:          String = "navigationLogo"
+    public var navigationLogoOffline:   String = "navigationLogoOffline"
+    public var BackgroundDetail:        String = "backgroundDetail"
+    public var menuMoreImage:           String = "menuMoreImage"
+}
+
+

+ 0 - 30
iOSClient/Brand/NCBrandImages.h

@@ -1,30 +0,0 @@
-//
-//  NCBrandImages.h
-//  Crypto Cloud Technology Nextcloud
-//
-//  Created by Marino Faggiana on 15/06/16.
-//  Copyright (c) 2014 TWS. All rights reserved.
-//
-//  Author Marino Faggiana <m.faggiana@twsweb.it>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-#define image_tabBarPlus                        @"tabBarPlusNextcloud"
-
-#define image_brandLogin                        @"nextcloudLogin"
-#define image_brandNavigationController         @"nextcloud_navigationcontroller"
-#define image_brandNavigationControllerOffline  @"nextcloud_navigationcontroller_offline"
-#define image_brandBackgroundLite               @"nextcloud_lite"
-#define image_brandMenuMoreBackground           @"MoreBackground"

+ 0 - 1
iOSClient/CCGlobal.h

@@ -28,7 +28,6 @@
     #import "CustomImages.h"
     #import "CustomConstant.h"
 #else
-    #import "NCBrandImages.h"
     #import "NCBrandConstant.h"
 #endif
 

+ 1 - 0
iOSClient/CCStandardImages.h

@@ -162,6 +162,7 @@
 #define image_stoptask                          @"stoptask"
 #define image_stoptaskcrypto                    @"stoptaskcrypto"
 
+#define image_tabBarPlus                        @"tabBarPlusNextcloud"
 #define image_tabBarFiles                       @"tabBarFiles"
 #define image_tabBarActivity                    @"activity"
 #define image_tabBarTransfer                    @"transfer"

+ 0 - 0
iOSClient/Images.xcassets/nextcloud_lite.imageset/Contents.json → iOSClient/Images.xcassets/backgroundDetail.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_lite.imageset/nextcloud_lite.png → iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_lite.imageset/nextcloud_lite@2x.png → iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite@2x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_lite.imageset/nextcloud_lite@3x.png → iOSClient/Images.xcassets/backgroundDetail.imageset/nextcloud_lite@3x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloudLogin.imageset/Contents.json → iOSClient/Images.xcassets/loginLogo.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/nextcloudLogin.imageset/nextcloudLogin.png → iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloudLogin.imageset/nextcloudLogin@2x.png → iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin@2x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloudLogin.imageset/nextcloudLogin@3x.png → iOSClient/Images.xcassets/loginLogo.imageset/nextcloudLogin@3x.png


+ 0 - 0
iOSClient/Images.xcassets/MoreBackground.imageset/Contents.json → iOSClient/Images.xcassets/menuMoreImage.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/MoreBackground.imageset/MoreBackground@2x.jpg → iOSClient/Images.xcassets/menuMoreImage.imageset/MoreBackground@2x.jpg


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller.imageset/Contents.json → iOSClient/Images.xcassets/navigationLogo.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller.imageset/nextcloud_navigationcontroller.png → iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller.imageset/nextcloud_navigationcontroller@2x.png → iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller@2x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller.imageset/nextcloud_navigationcontroller@3x copia.png → iOSClient/Images.xcassets/navigationLogo.imageset/nextcloud_navigationcontroller@3x copia.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller_offline.imageset/Contents.json → iOSClient/Images.xcassets/navigationLogoOffline.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller_offline.imageset/nextcloud_navigationcontroller_offline.png → iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller_offline.imageset/nextcloud_navigationcontroller_offline@2x.png → iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline@2x.png


+ 0 - 0
iOSClient/Images.xcassets/nextcloud_navigationcontroller_offline.imageset/nextcloud_navigationcontroller_offline@3x.png → iOSClient/Images.xcassets/navigationLogoOffline.imageset/nextcloud_navigationcontroller_offline@3x.png


+ 1 - 1
iOSClient/Login/CCLogin.m

@@ -45,7 +45,7 @@
 {
     [super viewDidLoad];
     
-    self.imageBrand.image = [UIImage imageNamed:image_brandLogin];
+    self.imageBrand.image = [UIImage imageNamed:[NCBrandImages sharedInstance].login];
     self.login.backgroundColor = [NCBrandColor sharedInstance].brand;
     
     // Bottom label

+ 1 - 1
iOSClient/Main/CCDetail.m

@@ -84,7 +84,7 @@
 {
     [super viewDidLoad];
     
-    self.imageBackground.image = [UIImage imageNamed:image_brandBackgroundLite];
+    self.imageBackground.image = [UIImage imageNamed:[NCBrandImages sharedInstance].BackgroundDetail];
     
     if ([self.metadataDetail.fileName length] > 0 || [self.metadataDetail.directoryID length] > 0 || [self.metadataDetail.fileID length] > 0) {
     

+ 3 - 3
iOSClient/Main/CCMain.m

@@ -174,7 +174,7 @@
 
     // Back Button
     if ([_serverUrl isEqualToString:[CCUtility getHomeServerUrlActiveUrl:app.activeUrl]])
-        self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:image_brandNavigationController] style:UIBarButtonItemStylePlain target:nil action:nil];
+        self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:[NCBrandImages sharedInstance].navigationLogo] style:UIBarButtonItemStylePlain target:nil action:nil];
     
     // reMenu Background
     _reMenuBackgroundView = [[UIView alloc] init];
@@ -565,8 +565,8 @@
             
             self.navigationItem.title = nil;
             
-            if ([app.reachability isReachable] == NO) _ImageTitleHomeCryptoCloud = [[UIImageView alloc] initWithImage:[UIImage imageNamed:image_brandNavigationControllerOffline]];
-            else _ImageTitleHomeCryptoCloud = [[UIImageView alloc] initWithImage:[UIImage imageNamed:image_brandNavigationController]];
+            if ([app.reachability isReachable] == NO) _ImageTitleHomeCryptoCloud = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[NCBrandImages sharedInstance].navigationLogoOffline]];
+            else _ImageTitleHomeCryptoCloud = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[NCBrandImages sharedInstance].navigationLogo]];
             
             [_ImageTitleHomeCryptoCloud setUserInteractionEnabled:YES];
             UITapGestureRecognizer *singleTap =  [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(menuLogo)];

+ 1 - 1
iOSClient/Main/CCMore.swift

@@ -52,7 +52,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         
         tableView.separatorColor = NCBrandColor.sharedInstance.seperator
         
-        imageLogo.image = UIImage.init(named: image_brandMenuMoreBackground)
+        imageLogo.image = UIImage.init(named: NCBrandImages.sharedInstance.menuMoreImage)
         
         // create tap gesture recognizer
 

+ 2 - 1
iOSClient/Move/CCMove.m

@@ -114,10 +114,11 @@
 
     if (![_serverUrl length]) {
         
-        _serverUrl = [CCUtility getHomeServerUrlActiveUrl:activeUrl];
+        /*_serverUrl = [CCUtility getHomeServerUrlActiveUrl:activeUrl];
         UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:image_brandNavigationController]];
         [self.navigationController.navigationBar.topItem setTitleView:image];
         self.title = @"Home";
+        */
         
     } else {
         

+ 1 - 1
iOSClient/Settings/CCManageCryptoCloudSecurity.m

@@ -179,7 +179,7 @@
     
     XLFormRowDescriptor *row = [self.form formRowWithTag:@"mail"];
     
-    [CCUtility sendMailEncryptPass:row.value validateEmail:YES form:self];
+    [CCUtility sendMailEncryptPass:row.value validateEmail:YES form:self nameImage:[NCBrandImages sharedInstance].BackgroundDetail];
 }
 
 @end

+ 1 - 1
iOSClient/Settings/CCSettings.m

@@ -500,7 +500,7 @@
 
 - (void)sendMailEncryptPass
 {
-    [CCUtility sendMailEncryptPass:[CCUtility getEmail] validateEmail:NO form:self];
+    [CCUtility sendMailEncryptPass:[CCUtility getEmail] validateEmail:NO form:self nameImage:[NCBrandImages sharedInstance].BackgroundDetail];
 }
 
 #pragma --------------------------------------------------------------------------------------------

+ 1 - 1
iOSClient/Utility/CCUtility.h

@@ -155,7 +155,7 @@
 + (NSString *)deletingLastPathComponentFromServerUrl:(NSString *)serverUrl;
 + (NSString *)returnFileNamePathFromFileName:(NSString *)metadataFileName serverUrl:(NSString *)serverUrl activeUrl:(NSString *)activeUrl;
 
-+ (void)sendMailEncryptPass:(NSString *)recipient validateEmail:(BOOL)validateEmail form:(id)form;
++ (void)sendMailEncryptPass:(NSString *)recipient validateEmail:(BOOL)validateEmail form:(id)form nameImage:(NSString *)nameImage;
 
 + (NSString *)localizableBrand:(NSString *)localize table:(NSString *)table;
 

+ 2 - 2
iOSClient/Utility/CCUtility.m

@@ -685,7 +685,7 @@
     return fileName;
 }
 
-+ (void)sendMailEncryptPass:(NSString *)recipient validateEmail:(BOOL)validateEmail form:(id)form
++ (void)sendMailEncryptPass:(NSString *)recipient validateEmail:(BOOL)validateEmail form:(id)form nameImage:(NSString *)nameImage
 {
     BOOL error = NO;
     
@@ -706,7 +706,7 @@
         
         NSString *htmlMsg =[NSString stringWithFormat:@"<html><body><p>%@ : %@ , %@</p></body></html>", NSLocalizedString(@"_text1_mail_encryptpass_", nil), key, NSLocalizedString(@"_text2_mail_encryptpass_", nil)];
         
-        NSData *jpegData = UIImageJPEGRepresentation([UIImage imageNamed:image_brandBackgroundLite], 1.0);
+        NSData *jpegData = UIImageJPEGRepresentation([UIImage imageNamed:nameImage], 1.0);
         [mc addAttachmentData:jpegData mimeType:@"image/jpeg" fileName:@"cryptocloud.png"];
         [mc setMessageBody:htmlMsg isHTML:YES];