marinofaggiana 5 년 전
부모
커밋
c77abc8087
4개의 변경된 파일14개의 추가작업 그리고 28개의 파일을 삭제
  1. 4 0
      iOSClient/AppDelegate.m
  2. 7 24
      iOSClient/Main/CCDetail.m
  3. 3 3
      iOSClient/Main/CCMore.swift
  4. 0 1
      iOSClient/ScanDocument/ScanCollectionView.swift

+ 4 - 0
iOSClient/AppDelegate.m

@@ -1005,6 +1005,9 @@ PKPushRegistry *pushRegistry;
     // Dark Mode
     [NCBrandColor.sharedInstance setDarkMode];
     
+    // View
+    viewController.view.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
+
     // NavigationBar
     if (viewController.navigationController.navigationBar) {
         viewController.navigationController.navigationBar.translucent = false;
@@ -1035,6 +1038,7 @@ PKPushRegistry *pushRegistry;
     [button setBackgroundImage:buttonImage forState:UIControlStateNormal];
     [button setBackgroundImage:buttonImage forState:UIControlStateHighlighted];
                 
+    // TableView
     if (tableView) {
         tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
         tableView.separatorColor = NCBrandColor.sharedInstance.separator;

+ 7 - 24
iOSClient/Main/CCDetail.m

@@ -61,7 +61,6 @@
     if (self = [super initWithCoder:aDecoder])  {
         
         appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
 
         self.metadataDetail = [[tableMetadata alloc] init];
@@ -87,18 +86,7 @@
 
     self.imageBackground.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"logo"] multiplier:2 color:[NCBrandColor.sharedInstance.brand colorWithAlphaComponent:0.4]];
     
-    // Change bar bottom line shadow and remove title back button <"title"
-    self.navigationController.navigationBar.topItem.title = @"";
-    self.navigationController.navigationBar.translucent = NO;
-    self.navigationController.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand;
-    self.navigationController.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText;
-    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : NCBrandColor.sharedInstance.brandText}];
-    self.navigationController.navigationBar.shadowImage = [CCGraphics generateSinglePixelImageWithColor:NCBrandColor.sharedInstance.brand];
-    [self.navigationController.navigationBar setAlpha:1];
-
-    // TabBar
-    self.tabBarController.tabBar.hidden = YES;
-    self.tabBarController.tabBar.translucent = YES;
+    [self changeTheming];
     
     // Open View
     if ([self.metadataDetail.fileNameView length] > 0 || [self.metadataDetail.serverUrl length] > 0 || [self.metadataDetail.ocId length] > 0) {        
@@ -106,16 +94,6 @@
     }
 }
 
-- (void)viewWillAppear:(BOOL)animated
-{
-    [super viewWillAppear:animated];
-    
-     // TabBar
-    self.tabBarController.tabBar.hidden = YES;
-    self.tabBarController.tabBar.translucent = YES;
-    self.view.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
-}
-
 - (void)viewWillDisappear:(BOOL)animated
 {
     [super viewWillDisappear:animated];
@@ -150,7 +128,12 @@
         self.toolbar.tintColor = NCBrandColor.sharedInstance.brandElement;
     }
     
-    self.view.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
+    // reload image
+    if ([self.metadataDetail.typeFile isEqualToString: k_metadataTypeFile_image]) {
+        
+        self.edgesForExtendedLayout = UIRectEdgeAll;
+        [self viewImage];
+    }
 }
 
 - (void)changeToDisplayMode

+ 3 - 3
iOSClient/Main/CCMore.swift

@@ -188,6 +188,8 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
     
     @objc func changeTheming() {
         
+        appDelegate.changeTheming(self, tableView: tableView, collectionView: nil)
+
         self.view.backgroundColor = NCBrandColor.sharedInstance.brand
         viewQuota.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
         progressQuota.progressTintColor = NCBrandColor.sharedInstance.brandElement
@@ -202,9 +204,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         
         labelUsername.textColor = NCBrandColor.sharedInstance.brandText
         
-        disclosureIndicator.image = CCGraphics.changeThemingColorImage(disclosureIndicator.image, width: 48, height: 52, color: NCBrandColor.sharedInstance.brandText)
-        
-        appDelegate.changeTheming(self, tableView: tableView, collectionView: nil)
+        disclosureIndicator.image = CCGraphics.changeThemingColorImage(disclosureIndicator.image, width: 48, height: 52, color: NCBrandColor.sharedInstance.brandText)        
     }
     
     @objc func changeUserProfile() {

+ 0 - 1
iOSClient/ScanDocument/ScanCollectionView.swift

@@ -61,7 +61,6 @@ class DragDropViewController: UIViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
         
-        self.view.backgroundColor = NCBrandColor.sharedInstance.backgroundView
         
         collectionViewSource.dragInteractionEnabled = true
         collectionViewSource.dragDelegate = self