Browse Source

fix io11 verticalbar UIScrollViewContentInsetAdjustmentNever

Marino Faggiana 7 years ago
parent
commit
3a6a343eca
3 changed files with 10 additions and 0 deletions
  1. 3 0
      iOSClient/Favorites/CCFavorites.m
  2. 3 0
      iOSClient/Main/CCMain.m
  3. 4 0
      iOSClient/Main/CCMore.swift

+ 3 - 0
iOSClient/Favorites/CCFavorites.m

@@ -72,6 +72,9 @@
     self.tableView.emptyDataSetDelegate = self;
     self.tableView.emptyDataSetSource = self;
     self.tableView.delegate = self;
+    if (@available(iOS 11, *)) {
+        self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+    }
     
     // calculate _serverUrl
     if (!_serverUrl)

+ 3 - 0
iOSClient/Main/CCMain.m

@@ -140,6 +140,9 @@
     self.tableView.delegate = self;
     self.tableView.tableFooterView = [UIView new];
     self.tableView.separatorColor = [NCBrandColor sharedInstance].seperator;
+    if (@available(iOS 11, *)) {
+        self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
+    }
     self.tableView.emptyDataSetDelegate = self;
     self.tableView.emptyDataSetSource = self;
     self.searchController.delegate = self;

+ 4 - 0
iOSClient/Main/CCMore.swift

@@ -53,6 +53,10 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
         tableView.dataSource = self
         
         tableView.separatorColor = NCBrandColor.sharedInstance.seperator
+                
+        if #available(iOS 11.0, *) {
+            tableView.contentInsetAdjustmentBehavior = .never
+        }
         
         themingBackground.image = UIImage.init(named: "themingBackground")