Browse Source

New navbar initial concept

Signed-off-by: Philippe Weidmann <philippe.weidmann@infomaniak.com>
Philippe Weidmann 4 years ago
parent
commit
4aa7ed774b

+ 1 - 1
Cartfile.resolved

@@ -16,7 +16,7 @@ github "krzyzanowskim/OpenSSL" "1.0.218"
 github "malcommac/SwiftRichString" "3.7.1"
 github "marinofaggiana/AFNetworking" "2967678c3e0e98c9b8d7e06222ad12d1f49c26f2"
 github "marinofaggiana/KTVHTTPCache" "2.0.2"
-github "nextcloud/ios-communication-library" "449172b33bc46dfaa8928db8a99ab21158430a0a"
+github "nextcloud/ios-communication-library" "19bc2a6a8980cc5a0db5002ff72d3d5817a3252f"
 github "realm/realm-cocoa" "v4.4.1"
 github "rechsteiner/Parchment" "v1.7.0"
 github "scenee/FloatingPanel" "v1.7.4"

+ 8 - 0
Nextcloud.xcodeproj/project.pbxproj

@@ -30,6 +30,8 @@
 		3781B9B023DB2B7E006B4B1D /* AppDelegate+Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3781B9AF23DB2B7E006B4B1D /* AppDelegate+Menu.swift */; };
 		3781B9B223DB2B9F006B4B1D /* CCMain+Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3781B9B123DB2B9F006B4B1D /* CCMain+Menu.swift */; };
 		3781B9B423DB2BC9006B4B1D /* CCFavorites+Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3781B9B323DB2BC9006B4B1D /* CCFavorites+Menu.swift */; };
+		37C83A0D24532B7200618A3B /* AppDelegate+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37C83A0C24532B7200618A3B /* AppDelegate+Swift.swift */; };
+		37C83A0F24532BA600618A3B /* CCMain+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37C83A0E24532BA600618A3B /* CCMain+Swift.swift */; };
 		37ECC83B23D0C7410082EFA2 /* NCMenuAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37ECC83A23D0C7400082EFA2 /* NCMenuAction.swift */; };
 		F70006FA24164F8D00F214A5 /* NCViewerImageVideo.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F70006F924164F8D00F214A5 /* NCViewerImageVideo.storyboard */; };
 		F70006FC2416500B00F214A5 /* NCViewerImageVideo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70006FB2416500B00F214A5 /* NCViewerImageVideo.swift */; };
@@ -600,6 +602,8 @@
 		3781B9AF23DB2B7E006B4B1D /* AppDelegate+Menu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Menu.swift"; sourceTree = "<group>"; };
 		3781B9B123DB2B9F006B4B1D /* CCMain+Menu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CCMain+Menu.swift"; sourceTree = "<group>"; };
 		3781B9B323DB2BC9006B4B1D /* CCFavorites+Menu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CCFavorites+Menu.swift"; sourceTree = "<group>"; };
+		37C83A0C24532B7200618A3B /* AppDelegate+Swift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Swift.swift"; sourceTree = "<group>"; };
+		37C83A0E24532BA600618A3B /* CCMain+Swift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CCMain+Swift.swift"; sourceTree = "<group>"; };
 		37ECC83A23D0C7400082EFA2 /* NCMenuAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCMenuAction.swift; sourceTree = "<group>"; };
 		F70006F924164F8D00F214A5 /* NCViewerImageVideo.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCViewerImageVideo.storyboard; sourceTree = "<group>"; };
 		F70006FB2416500B00F214A5 /* NCViewerImageVideo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCViewerImageVideo.swift; sourceTree = "<group>"; };
@@ -1423,6 +1427,8 @@
 				F7226EDB1EE4089300EBECB1 /* Main.storyboard */,
 				371B5A2F23D0B04B00FAFAE9 /* Menu */,
 				F710D1F624057C9400A6033D /* NCDetailNavigationController.swift */,
+				37C83A0C24532B7200618A3B /* AppDelegate+Swift.swift */,
+				37C83A0E24532BA600618A3B /* CCMain+Swift.swift */,
 				F710D1F824057C9D00A6033D /* NCDetailViewController.swift */,
 				F7D6650620FF341600BFBA9E /* NCMainCommon.swift */,
 				F7E09CE223E3087F00FB3E9E /* NCMainRefreshControl.swift */,
@@ -3098,6 +3104,7 @@
 				F7AE00F8230E81CB007ACF8A /* NCBrowserWeb.swift in Sources */,
 				F7E9C41B20F4CA870040CF18 /* CCTransfers.m in Sources */,
 				F73B4F0D1F470D9100BBEE4B /* nsLatin1Prober.cpp in Sources */,
+				37C83A0F24532BA600618A3B /* CCMain+Swift.swift in Sources */,
 				F77B0DF51D118A16002130FE /* CCUtility.m in Sources */,
 				F762CB071EACB66200B38484 /* XLFormOptionsObject.m in Sources */,
 				F7C525A01E3B48B700FFE02C /* CCNotification.swift in Sources */,
@@ -3334,6 +3341,7 @@
 				F70022C81EC4C9100080073F /* OCRichObjectStrings.m in Sources */,
 				F77B0ED11D118A16002130FE /* Acknowledgements.m in Sources */,
 				F7E4D9C422ED929B003675FD /* NCShareComments.swift in Sources */,
+				37C83A0D24532B7200618A3B /* AppDelegate+Swift.swift in Sources */,
 				F73CC06C1E813DFF006E3047 /* BKPasscodeField.m in Sources */,
 				F77B0ED51D118A16002130FE /* PHAsset+Utility.m in Sources */,
 				F73B4EFD1F470D9100BBEE4B /* LangHebrewModel.cpp in Sources */,

+ 5 - 15
iOSClient/AppDelegate.m

@@ -110,10 +110,6 @@
     // [[AVAudioSession sharedInstance] setActive:YES error:nil];
     [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
     
-    // APPEARANCE: How to hide UINavigationBar 1px bottom line < iOS 11
-    [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
-    [[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
-    [UINavigationBar appearance].translucent = NO;
     
     // ProgressView Detail
     self.progressViewDetail = [[UIProgressView alloc] initWithProgressViewStyle: UIProgressViewStyleBar];
@@ -1003,24 +999,18 @@
         
     // NavigationBar
     if (viewController.navigationController.navigationBar) {
-        viewController.navigationController.navigationBar.translucent = NO;
-        viewController.navigationController.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand;
-        viewController.navigationController.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText;
-        if ([self.reachability isReachable]) {
-            [viewController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : NCBrandColor.sharedInstance.brandText}];
-        } else {
-            [viewController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : NCBrandColor.sharedInstance.connectionNo}];
+        if (![self.reachability isReachable]) {
+           [viewController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : NCBrandColor.sharedInstance.connectionNo}];
         }
-        viewController.navigationController.navigationBar.shadowImage = [CCGraphics generateSinglePixelImageWithColor:NCBrandColor.sharedInstance.brand];
-        [viewController.navigationController.navigationBar setAlpha:1];
     }
     
+    [self configureNavBarForViewController:viewController];
+    
     //tabBar
     if (viewController.tabBarController.tabBar) {
         viewController.tabBarController.tabBar.translucent = NO;
-        viewController.tabBarController.tabBar.barTintColor = NCBrandColor.sharedInstance.tabBar;
+        viewController.tabBarController.tabBar.barTintColor = NCBrandColor.sharedInstance.backgroundView;
         viewController.tabBarController.tabBar.tintColor = NCBrandColor.sharedInstance.brandElement;
-        [viewController.tabBarController.tabBar setAlpha:1];
     }
     
     //tabBar button Plus

+ 32 - 1
iOSClient/Brand/Intro/NCIntroViewController.swift

@@ -57,8 +57,22 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
             textColorOpponent = .black
         }
         
+        if #available(iOS 13.0, *) {
+            let navBarAppearance = UINavigationBarAppearance()
+            navBarAppearance.configureWithTransparentBackground()
+            navBarAppearance.shadowColor = .clear
+            navBarAppearance.shadowImage = UIImage()
+            self.navigationController?.navigationBar.standardAppearance = navBarAppearance
+        } else {
+            self.navigationController?.navigationBar.isTranslucent = true
+            self.navigationController?.navigationBar.shadowImage = UIImage()
+            self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
+            self.navigationController?.navigationBar.backgroundColor = .clear
+            self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.customer
+        }
         self.navigationController?.navigationBar.tintColor = textColor
-        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.customer
+
+        
         self.pageControl.currentPageIndicatorTintColor = textColor
         self.pageControl.pageIndicatorTintColor = NCBrandColor.sharedInstance.nextcloudSoft
 
@@ -84,6 +98,18 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
         self.view.backgroundColor = NCBrandColor.sharedInstance.customer
         self.timerAutoScroll = Timer.scheduledTimer(timeInterval: 5, target: self, selector: (#selector(NCIntroViewController.autoScroll)), userInfo: nil, repeats: true)
     }
+    
+    override var preferredStatusBarStyle: UIStatusBarStyle {
+        if #available(iOS 13.0, *) {
+            if traitCollection.userInterfaceStyle == .light {
+                return .lightContent
+            } else {
+                return .darkContent
+            }
+        } else {
+            return .lightContent
+        }
+    }
 
     override func viewWillDisappear(_ animated: Bool) {
         super.viewWillDisappear(animated)
@@ -156,3 +182,8 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
         }
     }
 }
+extension UINavigationController {
+    open override var childForStatusBarStyle: UIViewController? {
+        return topViewController?.childForStatusBarStyle ?? topViewController
+    }
+}

+ 1 - 1
iOSClient/Brand/iOSClient.plist

@@ -147,6 +147,6 @@
 	<key>UISupportsDocumentBrowser</key>
 	<true/>
 	<key>UIViewControllerBasedStatusBarAppearance</key>
-	<false/>
+	<true/>
 </dict>
 </plist>

+ 37 - 0
iOSClient/Main/AppDelegate+Swift.swift

@@ -0,0 +1,37 @@
+//
+//  AppDelegate+Swift.swift
+//  Nextcloud
+//
+//  Created by Philippe Weidmann on 24.04.20.
+//  Copyright © 2020 Marino Faggiana. All rights reserved.
+//
+
+import Foundation
+
+extension AppDelegate {
+
+    @objc func configureNavBarForViewController(_ viewController: UIViewController) {
+        if #available(iOS 13.0, *) {
+            var navBarAppearance = UINavigationBarAppearance()
+            navBarAppearance.configureWithOpaqueBackground()
+            navBarAppearance.shadowColor = .clear
+            navBarAppearance.shadowImage = UIImage()
+            viewController.navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
+
+            navBarAppearance = UINavigationBarAppearance()
+            navBarAppearance.configureWithOpaqueBackground()
+            navBarAppearance.backgroundColor = .systemBackground
+
+            viewController.navigationController?.navigationBar.standardAppearance = navBarAppearance
+        } else {
+            viewController.navigationController?.navigationBar.barStyle = .default
+            viewController.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.backgroundView
+            viewController.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor:NCBrandColor.sharedInstance.textView]
+            if #available(iOS 11.0, *) {
+                viewController.navigationController?.navigationBar.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor:NCBrandColor.sharedInstance.textView]
+            }
+        }
+        viewController.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brand
+    }
+    
+}

+ 45 - 0
iOSClient/Main/CCMain+Swift.swift

@@ -0,0 +1,45 @@
+//
+//  CCMain+Swift.swift
+//  Nextcloud
+//
+//  Created by Philippe Weidmann on 24.04.20.
+//  Copyright © 2020 Marino Faggiana. All rights reserved.
+//
+
+import Foundation
+
+extension CCMain {
+
+    @objc func updateNavBarShadow(_ hide: Bool) {
+        if hide {
+            if #available(iOS 13.0, *) {
+                let navBarAppearance = UINavigationBarAppearance()
+                navBarAppearance.configureWithOpaqueBackground()
+                navBarAppearance.backgroundColor = .systemBackground
+                self.navigationController?.navigationBar.standardAppearance = navBarAppearance
+            } else {
+                self.navigationController?.navigationBar.barStyle = .default
+                self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.backgroundView
+                self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brand
+                self.navigationController?.navigationBar.shadowImage = nil
+            }
+            self.navigationController?.navigationBar.setNeedsLayout()
+
+        } else {
+            if #available(iOS 13.0, *) {
+                let navBarAppearance = UINavigationBarAppearance()
+                navBarAppearance.configureWithOpaqueBackground()
+                navBarAppearance.backgroundColor = .systemBackground
+                navBarAppearance.shadowColor = .clear
+                navBarAppearance.shadowImage = UIImage()
+                self.navigationController?.navigationBar.standardAppearance = navBarAppearance
+            } else {
+                self.navigationController?.navigationBar.barStyle = .default
+                self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.backgroundView
+                self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brand
+                self.navigationController?.navigationBar.shadowImage = UIImage()
+            }
+            self.navigationController?.navigationBar.setNeedsLayout()
+        }
+    }
+}

+ 3 - 0
iOSClient/Main/CCMain.h

@@ -52,6 +52,9 @@
 @property (nonatomic, strong) tableMetadata *metadataForPushDetail;
 @property (nonatomic, strong) NSString *selectorForPushDetail;
 
+@property (nonatomic, strong) UIView *headerView;
+@property (nonatomic, strong) UIButton *sortButton;
+
 @property (nonatomic, strong) NSString *serverUrl;
 @property (nonatomic, strong) NSString *titleMain;
 @property (nonatomic, strong) NSString *richWorkspaceText;

+ 47 - 61
iOSClient/Main/CCMain.m

@@ -48,7 +48,7 @@
     NSUInteger _failedAttempts;
     NSDate *_lockUntilDate;
 
-    NCMainRefreshControl *refreshControl;
+    UIRefreshControl *refreshControl;
 
     CCHud *_hud;
     
@@ -141,38 +141,43 @@
     self.searchController.searchResultsUpdater = self;
     self.searchController.dimsBackgroundDuringPresentation = NO;
     self.searchController.searchBar.translucent = NO;
+    self.automaticallyAdjustsScrollViewInsets = false;
     [self.searchController.searchBar sizeToFit];
-    self.searchController.searchBar.delegate = self;
-    self.searchController.searchBar.barTintColor = NCBrandColor.sharedInstance.brand;
-    self.searchController.searchBar.backgroundColor = NCBrandColor.sharedInstance.brand;
-    self.searchController.searchBar.backgroundImage = [UIImage new];
+    self.searchController.searchBar.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
+    self.searchController.searchBar.searchBarStyle = UISearchBarStyleMinimal;
     UIButton *searchButton = self.searchController.searchBar.subviews.firstObject.subviews.lastObject;
     if (searchButton && [searchButton isKindOfClass:[UIButton class]]) {
-        [searchButton setTitleColor:NCBrandColor.sharedInstance.brandText forState:UIControlStateNormal];
+        [searchButton setTitleColor:NCBrandColor.sharedInstance.brand forState:UIControlStateNormal];
     }
     UITextField *searchTextView = [self.searchController.searchBar valueForKey:@"searchField"];
     if (searchTextView && [searchTextView isKindOfClass:[UITextField class]]) {
-        searchTextView.backgroundColor = NCBrandColor.sharedInstance.backgroundForm;
         searchTextView.textColor = NCBrandColor.sharedInstance.textView;
     }
-    heightSearchBar = self.searchController.searchBar.frame.size.height;
     
+    self.headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, self.searchController.searchBar.frame.size.height + 40)];
+            
     // Load Rich Workspace
     self.viewRichWorkspace = [[[NSBundle mainBundle] loadNibNamed:@"NCRichWorkspace" owner:self options:nil] firstObject];
     if (@available(iOS 11, *)) {
         UITapGestureRecognizer *viewRichWorkspaceTapped = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(viewRichWorkspaceTapAction:)];
         viewRichWorkspaceTapped.numberOfTapsRequired = 1;
         viewRichWorkspaceTapped.delegate = self;
-        [self.viewRichWorkspace addGestureRecognizer:viewRichWorkspaceTapped];
+        [self.viewRichWorkspace.richView addGestureRecognizer:viewRichWorkspaceTapped];
     }
-    heightRichWorkspace = UIScreen.mainScreen.bounds.size.height/4 + heightSearchBar;
-    self.viewRichWorkspace.textViewTopConstraint.constant = heightSearchBar;
-    [self.viewRichWorkspace setFrame:CGRectMake(0, 0, self.tableView.frame.size.width, heightRichWorkspace)];
     
+    self.sortButton = self.viewRichWorkspace.sortButton;
+    heightSearchBar = self.viewRichWorkspace.topView.frame.size.height;
+
+    [self.sortButton setTitleColor:NCBrandColor.sharedInstance.brand forState:UIControlStateNormal];
+    [self.sortButton setTitle: [NSString stringWithFormat:@"Sorted by %@ ", [CCUtility getOrderSettings]] forState:UIControlStateNormal];
+    [self.sortButton addTarget:self action:@selector(toggleReMainMenu) forControlEvents:UIControlEventTouchUpInside];
+    
+    heightRichWorkspace = UIScreen.mainScreen.bounds.size.height / 4 + heightSearchBar;
+    [self.viewRichWorkspace setFrame:CGRectMake(0, 0, self.tableView.frame.size.width, heightRichWorkspace)];
+    [self.viewRichWorkspace.searchViewHolder addSubview:self.searchController.searchBar];
     // Table Header View
     [self.tableView setTableHeaderView:self.viewRichWorkspace];
-    [self.tableView.tableHeaderView addSubview:self.searchController.searchBar];
-    
+
     // Register cell
     [self.tableView registerNib:[UINib nibWithNibName:@"CCCellMain" bundle:nil] forCellReuseIdentifier:@"CellMain"];
     [self.tableView registerNib:[UINib nibWithNibName:@"CCCellMainTransfer" bundle:nil] forCellReuseIdentifier:@"CellMainTransfer"];
@@ -197,7 +202,6 @@
     
     // Title
     [self setTitle];
-
     // changeTheming
     [self changeTheming];
 }
@@ -313,6 +317,10 @@
     }
 }
 
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
+    [self updateNavBarShadow:scrollView.contentOffset.y > 0];
+}
+
 - (void)changeTheming
 {
     [appDelegate changeTheming:self tableView:self.tableView collectionView:nil form:false];
@@ -321,21 +329,21 @@
     [[NCMainCommon sharedInstance] createImagesThemingColor];
     
     // Refresh control
-    refreshControl.tintColor = NCBrandColor.sharedInstance.brandText;
-    refreshControl.backgroundColor = NCBrandColor.sharedInstance.brand;
+    refreshControl.tintColor = UIColor.lightGrayColor;
+    refreshControl.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
 
+    [self.sortButton setTitleColor:NCBrandColor.sharedInstance.brand forState:UIControlStateNormal];
     // color searchbar
-    self.searchController.searchBar.barTintColor = NCBrandColor.sharedInstance.brand;
-    self.searchController.searchBar.backgroundColor = NCBrandColor.sharedInstance.brand;
+    self.searchController.searchBar.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
+    self.searchController.searchBar.tintColor = NCBrandColor.sharedInstance.brand;
     // color searchbbar button text (cancel)
     UIButton *searchButton = self.searchController.searchBar.subviews.firstObject.subviews.lastObject;
     if (searchButton && [searchButton isKindOfClass:[UIButton class]]) {
-        [searchButton setTitleColor:NCBrandColor.sharedInstance.brandText forState:UIControlStateNormal];
+        [searchButton setTitleColor:NCBrandColor.sharedInstance.brand forState:UIControlStateNormal];
     }
     // color textview searchbbar
     UITextField *searchTextView = [self.searchController.searchBar valueForKey:@"searchField"];
     if (searchTextView && [searchTextView isKindOfClass:[UITextField class]]) {
-        searchTextView.backgroundColor = NCBrandColor.sharedInstance.backgroundForm;
         searchTextView.textColor = NCBrandColor.sharedInstance.textView;
     }
     
@@ -689,9 +697,8 @@
     
     self.tableView.refreshControl = refreshControl;
     
-    refreshControl.tintColor = NCBrandColor.sharedInstance.brandText;
-    refreshControl.backgroundColor = NCBrandColor.sharedInstance.brand;
-    
+    refreshControl.tintColor = UIColor.lightGrayColor;
+    refreshControl.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
     [refreshControl addTarget:self action:@selector(refreshControlTarget) forControlEvents:UIControlEventValueChanged];
 }
 
@@ -730,33 +737,16 @@
         self.navigationItem.title = [NSString stringWithFormat:@"%@ : %lu / %lu", NSLocalizedString(@"_selected_", nil), (unsigned long)selezionati, (unsigned long)totali];
 
     } else {
-        
-        // we are in home : LOGO BRAND
-        if ([_serverUrl isEqualToString:[CCUtility getHomeServerUrlActiveUrl:appDelegate.activeUrl]]) {
-            
-            self.navigationItem.title = nil;
-
-            UIImage *image = [self getImageLogoHome];
-
-            _imageTitleHome = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 60, 30)]; // IMAGE = 120 x 60
-            _imageTitleHome.contentMode = UIViewContentModeScaleAspectFill;
-            _imageTitleHome.translatesAutoresizingMaskIntoConstraints = NO;
-            _imageTitleHome.image = image;
-            
-            // backbutton
-            self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:nil action:nil];
-            
-            [_imageTitleHome setUserInteractionEnabled:YES];
-            UITapGestureRecognizer *singleTap =  [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(menuLogo:)];
-            [singleTap setNumberOfTapsRequired:1];
-            [_imageTitleHome addGestureRecognizer:singleTap];
-            
-            self.navigationItem.titleView = _imageTitleHome;
-            
-        } else {
-            
-            self.navigationItem.title = _titleMain;
-            self.navigationItem.titleView = nil;
+        if (@available(iOS 11.0, *)) {
+            if (_isRoot) {
+                    self.navigationController.navigationBar.prefersLargeTitles = true;
+                    self.navigationItem.title = NCBrandOptions.sharedInstance.brand;
+                
+                    self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeAlways;
+                
+            } else {
+                self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
+            }
         }
     }
 }
@@ -788,13 +778,9 @@
 
 - (void)setUINavigationBarDefault
 {
-    UIBarButtonItem *buttonMore, *buttonNotification, *buttonSelect;
-    
-    // =
-    buttonMore = [[UIBarButtonItem alloc] initWithImage:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"navigationSort"] width:50 height:50 color:NCBrandColor.sharedInstance.textView] style:UIBarButtonItemStylePlain target:self action:@selector(toggleReMainMenu)];
-    buttonMore.enabled = true;
+    UIBarButtonItem *buttonNotification, *buttonSelect;
     
-    buttonSelect = [[UIBarButtonItem alloc] initWithImage:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"select"] width:50 height:50 color:NCBrandColor.sharedInstance.textView] style:UIBarButtonItemStylePlain target:self action:@selector(tableViewToggle)];
+    buttonSelect = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"_select_", @"") style:UIBarButtonItemStylePlain target:self action:@selector(tableViewToggle)];
     buttonSelect.enabled = true;
     
     // <
@@ -809,9 +795,9 @@
     }
     
     if (buttonNotification)
-        self.navigationItem.rightBarButtonItems = [[NSArray alloc] initWithObjects:buttonMore, buttonSelect, buttonNotification, nil];
+        self.navigationItem.rightBarButtonItems = [[NSArray alloc] initWithObjects:buttonSelect, buttonNotification, nil];
     else
-        self.navigationItem.rightBarButtonItems = [[NSArray alloc] initWithObjects:buttonMore, buttonSelect, nil];
+        self.navigationItem.rightBarButtonItems = [[NSArray alloc] initWithObjects:buttonSelect, nil];
     
     self.navigationItem.leftBarButtonItem = nil;
 }
@@ -1426,7 +1412,7 @@
 - (void)updateSearchResultsForSearchController:(UISearchController *)searchController
 {
     // Color text "Cancel"
-    [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTintColor:NCBrandColor.sharedInstance.brandText];
+    [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]] setTintColor:NCBrandColor.sharedInstance.brand];
     
     if (searchController.isActive) {
         [self deleteRefreshControl];
@@ -2913,8 +2899,8 @@
         [self.viewRichWorkspace setFrame:CGRectMake(self.tableView.tableHeaderView.frame.origin.x, self.tableView.tableHeaderView.frame.origin.y, self.tableView.frame.size.width, heightRichWorkspace)];
     }
     
+    self.searchController.searchBar.frame = self.viewRichWorkspace.searchViewHolder.frame;
     [self.viewRichWorkspace loadWithRichWorkspaceText:self.richWorkspaceText];
-    self.searchController.searchBar.frame = CGRectMake(self.searchController.searchBar.frame.origin.x, self.searchController.searchBar.frame.origin.y, self.tableView.frame.size.width, heightSearchBar);
     [self.tableView reloadData];
 }
 

+ 0 - 2
iOSClient/Main/CCMore.swift

@@ -186,10 +186,8 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
     }
     
     @objc func changeTheming() {
-        
         appDelegate.changeTheming(self, tableView: tableView, collectionView: nil, form: false)
 
-        self.view.backgroundColor = NCBrandColor.sharedInstance.brand
         viewQuota.backgroundColor = NCBrandColor.sharedInstance.backgroundView;
         progressQuota.progressTintColor = NCBrandColor.sharedInstance.brandElement
         themingBackground.backgroundColor = NCBrandColor.sharedInstance.backgroundView;

+ 6 - 7
iOSClient/Main/Main.storyboard

@@ -207,8 +207,8 @@
                 <navigationController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="bSZ-tE-FEj" sceneMemberID="viewController">
                     <tabBarItem key="tabBarItem" title="File" id="Zxv-aS-HGF"/>
                     <toolbarItems/>
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="cj6-rT-wnB">
-                        <rect key="frame" x="0.0" y="44" width="414" height="44"/>
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" translucent="NO" largeTitles="YES" id="cj6-rT-wnB">
+                        <rect key="frame" x="0.0" y="44" width="414" height="96"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <nil name="viewControllers"/>
@@ -428,13 +428,13 @@
         <!--Main-->
         <scene sceneID="tgH-1R-Pha">
             <objects>
-                <viewController storyboardIdentifier="CCMain" id="Qyv-Eo-LeA" customClass="CCMain" sceneMemberID="viewController">
+                <viewController storyboardIdentifier="CCMain" extendedLayoutIncludesOpaqueBars="YES" id="Qyv-Eo-LeA" customClass="CCMain" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="QRE-ju-M4I">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="dC6-NQ-0Td">
-                                <rect key="frame" x="0.0" y="88" width="414" height="725"/>
+                                <rect key="frame" x="0.0" y="0.0" width="414" height="813"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <connections>
                                     <outlet property="dataSource" destination="Qyv-Eo-LeA" id="8v3-Et-JVZ"/>
@@ -442,12 +442,11 @@
                                 </connections>
                             </tableView>
                         </subviews>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
                             <constraint firstItem="dC6-NQ-0Td" firstAttribute="leading" secondItem="Sqy-z1-MI5" secondAttribute="leading" id="AAp-Xf-P1c"/>
                             <constraint firstItem="Sqy-z1-MI5" firstAttribute="trailing" secondItem="dC6-NQ-0Td" secondAttribute="trailing" id="DBL-Bo-AUz"/>
-                            <constraint firstItem="dC6-NQ-0Td" firstAttribute="top" secondItem="Sqy-z1-MI5" secondAttribute="top" id="Vez-ja-4Jl"/>
                             <constraint firstItem="Sqy-z1-MI5" firstAttribute="bottom" secondItem="dC6-NQ-0Td" secondAttribute="bottom" id="d6p-eB-e8X"/>
+                            <constraint firstItem="dC6-NQ-0Td" firstAttribute="top" secondItem="QRE-ju-M4I" secondAttribute="top" id="vqZ-BZ-kL8"/>
                         </constraints>
                         <viewLayoutGuide key="safeArea" id="Sqy-z1-MI5"/>
                     </view>
@@ -652,6 +651,6 @@
         <image name="tabBarPlus" width="80" height="80"/>
     </resources>
     <inferredMetricsTieBreakers>
-        <segue reference="W5b-lw-8O1"/>
+        <segue reference="2Qm-A6-CfB"/>
     </inferredMetricsTieBreakers>
 </document>

+ 3 - 3
iOSClient/Main/Menu/CCMain+Menu.swift

@@ -44,7 +44,7 @@ extension CCMain {
                     } else {
                         CCUtility.setOrderSettings("fileName")
                     }
-
+                    self.sortButton.setTitle((CCUtility.getAscendingSettings() ? NSLocalizedString("_order_by_name_a_z_", comment: "") : NSLocalizedString("_order_by_name_z_a_", comment: "")) + " ▽", for: .normal)
                     NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_clearDateReadDataSource), object: nil)
                 }
             )
@@ -64,7 +64,7 @@ extension CCMain {
                     } else {
                         CCUtility.setOrderSettings("date")
                     }
-
+                    self.sortButton.setTitle((CCUtility.getAscendingSettings() ? NSLocalizedString("_order_by_date_less_recent_", comment: "") : NSLocalizedString("_order_by_date_more_recent_", comment: "")) + " ▽", for: .normal)
                     NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_clearDateReadDataSource), object: nil)
                 }
             )
@@ -84,7 +84,7 @@ extension CCMain {
                     } else {
                         CCUtility.setOrderSettings("size")
                     }
-                    
+                    self.sortButton.setTitle((CCUtility.getAscendingSettings() ? NSLocalizedString("_order_by_size_largest_", comment: "") : NSLocalizedString("_order_by_size_smallest_", comment: "")) + " ▽", for: .normal)
                     NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_clearDateReadDataSource), object: nil)
                 }
             )

+ 3 - 3
iOSClient/Main/NCDetailNavigationController.swift

@@ -51,12 +51,12 @@ class NCDetailNavigationController: UINavigationController {
     
     //MARK: - NotificationCenter
     
+
     @objc func changeTheming() {
-        navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
-        navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor:NCBrandColor.sharedInstance.brandText]
+
     }
     
+
     //MARK: - Button
 
     @objc func openMenuMore() {

+ 10 - 0
iOSClient/Main/NCDetailViewController.swift

@@ -135,6 +135,14 @@ class NCDetailViewController: UIViewController {
         }
     }
     
+    override var preferredStatusBarStyle: UIStatusBarStyle {
+        if isNavigationBarHidden {
+            return .lightContent
+        } else {
+            return .default
+        }
+    }
+    
     //MARK: - Utility
 
     @objc func navigateControllerBarHidden(_ state: Bool) {
@@ -147,11 +155,13 @@ class NCDetailViewController: UIViewController {
         
         navigationController?.setNavigationBarHidden(state, animated: false)
         isNavigationBarHidden = state
+        self.setNeedsStatusBarAppearanceUpdate()
     }
     
     //MARK: - NotificationCenter
 
     @objc func changeTheming() {
+        appDelegate.changeTheming(self, tableView: nil, collectionView: nil, form: false)
         
         if backgroundView.image != nil {
             backgroundView.image = CCGraphics.changeThemingColorImage(UIImage.init(named: "logo"), multiplier: 2, color: NCBrandColor.sharedInstance.brand.withAlphaComponent(0.4))

+ 2 - 3
iOSClient/Main/NCMasterNavigationController.swift

@@ -48,9 +48,8 @@ class NCMasterNavigationController: UINavigationController {
     }
 
     @objc func changeTheming() {
-        navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
-        navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
-        navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor:NCBrandColor.sharedInstance.brandText]
+        navigationBar.barTintColor = NCBrandColor.sharedInstance.backgroundView
+        navigationBar.tintColor = NCBrandColor.sharedInstance.brand
     }
 }
 

+ 5 - 2
iOSClient/Media/NCMedia.swift

@@ -114,8 +114,8 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
         super.viewWillAppear(animated)
         
         // Configure Refresh Control
-        refreshControl.tintColor = NCBrandColor.sharedInstance.brandText
-        refreshControl.backgroundColor = NCBrandColor.sharedInstance.brand
+        refreshControl.tintColor = .lightGray
+        refreshControl.backgroundColor = NCBrandColor.sharedInstance.backgroundView
         refreshControl.addTarget(self, action: #selector(loadNetworkDatasource), for: .valueChanged)
         
         // get auto upload folder
@@ -152,6 +152,9 @@ class NCMedia: UIViewController, DropdownMenuDelegate, DZNEmptyDataSetSource, DZ
     @objc func changeTheming() {
         appDelegate.changeTheming(self, tableView: nil, collectionView: collectionView, form: false)
         
+        refreshControl.tintColor = .lightGray
+        refreshControl.backgroundColor = NCBrandColor.sharedInstance.backgroundView
+        
         cacheImages.cellPlayImage = CCGraphics.changeThemingColorImage(UIImage.init(named: "play"), width: 100, height: 100, color: .white)
         cacheImages.cellFavouriteImage = CCGraphics.changeThemingColorImage(UIImage.init(named: "favorite"), width: 100, height: 100, color: NCBrandColor.sharedInstance.yellowFavorite)
     }

+ 6 - 3
iOSClient/RichWorkspace/NCRichWorkspace.swift

@@ -26,8 +26,11 @@ import MarkdownKit
 
 @objc class NCViewRichWorkspace: UIView {
     
+    @IBOutlet weak var topView: UIView!
+    @IBOutlet weak var richView: UIView!
+    @IBOutlet weak var sortButton: UIButton!
+    @IBOutlet weak var searchViewHolder: UIView!
     @objc @IBOutlet weak var textView: UITextView!
-    @objc @IBOutlet weak var textViewTopConstraint: NSLayoutConstraint!
 
     private var markdownParser = MarkdownParser()
     private var richWorkspaceText: String?
@@ -41,12 +44,12 @@ import MarkdownKit
         // Gradient
         gradient.startPoint = CGPoint(x: 0, y: 0.60)
         gradient.endPoint = CGPoint(x: 0, y: 1)
-        layer.addSublayer(gradient)
+        richView.layer.addSublayer(gradient)
     }
     
     override func layoutSublayers(of layer: CALayer) {
         super.layoutSublayers(of: layer)
-        gradient.frame = self.bounds
+        gradient.frame = self.richView.bounds
     }
 
     @objc func changeTheming() {

+ 68 - 14
iOSClient/RichWorkspace/NCRichWorkspace.xib

@@ -1,38 +1,92 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina3_5" orientation="portrait" appearance="dark"/>
     <dependencies>
         <deployment version="4112" identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="NCViewRichWorkspace" customModule="Nextcloud" customModuleProvider="target">
+        <view clipsSubviews="YES" contentMode="scaleToFill" id="iN0-l3-epB" customClass="NCViewRichWorkspace" customModule="Nextcloud" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <textView clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="wri-16-tQY">
-                    <rect key="frame" x="15" y="50" width="295" height="420"/>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HlU-kk-zSG">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="97"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uNy-ff-uKP">
+                            <rect key="frame" x="0.0" y="4" width="320" height="44"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="44" id="66u-iM-EEA"/>
+                            </constraints>
+                        </view>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="whP-vX-7tm">
+                            <rect key="frame" x="0.0" y="56" width="320" height="32"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="32" id="zgp-GM-5ua"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="system" pointSize="18"/>
+                            <inset key="titleEdgeInsets" minX="16" minY="0.0" maxX="16" maxY="0.0"/>
+                            <state key="normal" title="Order by"/>
+                        </button>
+                        <view alpha="0.59999999999999998" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iLg-Pa-y0u">
+                            <rect key="frame" x="0.0" y="96" width="320" height="1"/>
+                            <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="1" id="3hR-TI-kRk"/>
+                            </constraints>
+                        </view>
+                    </subviews>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                    <color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
-                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                    <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
-                </textView>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="iLg-Pa-y0u" secondAttribute="bottom" id="7GT-SF-5YZ"/>
+                        <constraint firstItem="whP-vX-7tm" firstAttribute="top" secondItem="uNy-ff-uKP" secondAttribute="bottom" constant="8" id="9ER-B7-f33"/>
+                        <constraint firstItem="uNy-ff-uKP" firstAttribute="leading" secondItem="HlU-kk-zSG" secondAttribute="leading" id="Bbi-i9-gn0"/>
+                        <constraint firstItem="iLg-Pa-y0u" firstAttribute="leading" secondItem="HlU-kk-zSG" secondAttribute="leading" id="CXc-YZ-5Po"/>
+                        <constraint firstItem="whP-vX-7tm" firstAttribute="leading" secondItem="HlU-kk-zSG" secondAttribute="leading" id="CZf-VB-F7L"/>
+                        <constraint firstAttribute="trailing" secondItem="uNy-ff-uKP" secondAttribute="trailing" id="DhX-iq-PKr"/>
+                        <constraint firstItem="iLg-Pa-y0u" firstAttribute="top" secondItem="whP-vX-7tm" secondAttribute="bottom" constant="8" id="GaZ-ao-ygn"/>
+                        <constraint firstAttribute="height" constant="97" id="INp-JG-dK9"/>
+                        <constraint firstAttribute="trailing" secondItem="iLg-Pa-y0u" secondAttribute="trailing" id="WMv-Zi-7Yu"/>
+                        <constraint firstAttribute="trailing" secondItem="whP-vX-7tm" secondAttribute="trailing" id="bBp-TM-j1W"/>
+                    </constraints>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="orF-i7-sVP">
+                    <rect key="frame" x="0.0" y="97" width="320" height="383"/>
+                    <subviews>
+                        <textView clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="wri-16-tQY">
+                            <rect key="frame" x="8" y="8" width="304" height="379"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="textColor" systemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
+                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                            <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                        </textView>
+                    </subviews>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                </view>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
-                <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="wri-16-tQY" secondAttribute="bottom" constant="10" id="Ei6-vr-4dN"/>
-                <constraint firstItem="wri-16-tQY" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="50" id="O2Y-0W-v0n"/>
-                <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="wri-16-tQY" secondAttribute="trailing" constant="10" id="Rg0-g6-cT4"/>
-                <constraint firstItem="wri-16-tQY" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="15" id="o8o-lo-wZd"/>
+                <constraint firstItem="orF-i7-sVP" firstAttribute="bottom" secondItem="vUN-kp-3ea" secondAttribute="bottom" id="5Lm-EL-ubo"/>
+                <constraint firstItem="orF-i7-sVP" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="VlR-kH-SMa"/>
+                <constraint firstItem="HlU-kk-zSG" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="goy-iY-b90"/>
+                <constraint firstItem="HlU-kk-zSG" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="kDK-rY-LQb"/>
+                <constraint firstItem="orF-i7-sVP" firstAttribute="top" secondItem="HlU-kk-zSG" secondAttribute="bottom" id="sde-2m-MmE"/>
+                <constraint firstItem="orF-i7-sVP" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="xGI-uT-wsD"/>
+                <constraint firstItem="HlU-kk-zSG" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="z3E-6z-6PD"/>
             </constraints>
             <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
             <connections>
+                <outlet property="richView" destination="orF-i7-sVP" id="sWH-ON-Cum"/>
+                <outlet property="searchViewHolder" destination="uNy-ff-uKP" id="YnQ-Z1-Q5r"/>
+                <outlet property="sortButton" destination="whP-vX-7tm" id="4Yt-90-Nnj"/>
                 <outlet property="textView" destination="wri-16-tQY" id="pwA-gm-dfK"/>
-                <outlet property="textViewTopConstraint" destination="O2Y-0W-v0n" id="ggP-y2-Lft"/>
+                <outlet property="topView" destination="HlU-kk-zSG" id="KBp-vo-AWI"/>
             </connections>
             <point key="canvasLocation" x="136.875" y="88.75"/>
         </view>