Browse Source

fix split: preferredPrimaryColumnWidthFraction 40%

marinofaggiana 5 năm trước cách đây
mục cha
commit
7d69274ec7
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      iOSClient/Main/NCSplitViewController.swift

+ 7 - 1
iOSClient/Main/NCSplitViewController.swift

@@ -30,9 +30,15 @@ class NCSplitViewController: UISplitViewController {
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        
+                
         self.delegate = self
         self.preferredDisplayMode = .allVisible
+        if UIScreen.main.bounds.width > UIScreen.main.bounds.height {
+            self.maximumPrimaryColumnWidth = UIScreen.main.bounds.width
+        } else {
+            self.maximumPrimaryColumnWidth = UIScreen.main.bounds.height
+        }
+        self.preferredPrimaryColumnWidthFraction = 0.4
         
         let navigationController = viewControllers.first as? UINavigationController
         if let tabBarController = navigationController?.topViewController as? UITabBarController {