Browse Source

hide Navigation bar in NCViewerRichdocument, only for iPhone

Marino Faggiana 6 years ago
parent
commit
48940ec8bb
2 changed files with 10 additions and 1 deletions
  1. 7 0
      iOSClient/Main/CCDetail.m
  2. 3 1
      iOSClient/Viewer/NCViewerRichdocument.swift

+ 7 - 0
iOSClient/Main/CCDetail.m

@@ -118,6 +118,13 @@
     self.tabBarController.tabBar.translucent = YES;
 }
 
+- (void)viewWillDisappear:(BOOL)animated
+{
+    [super viewWillDisappear:animated];
+
+    [self.navigationController setNavigationBarHidden:false];
+}
+
 - (void)viewDidDisappear:(BOOL)animated
 {
     [super viewDidDisappear:animated];

+ 3 - 1
iOSClient/Viewer/NCViewerRichdocument.swift

@@ -38,7 +38,9 @@ class NCViewerRichdocument: NSObject, WKNavigationDelegate, WKScriptMessageHandl
         
         self.detail = detail
         
-//        detail.navigationController?.setNavigationBarHidden(true, animated: false)
+        if (UIDevice.current.userInterfaceIdiom == .phone) {
+            detail.navigationController?.setNavigationBarHidden(true, animated: false)
+        }
         
         let contentController = WKUserContentController()
         contentController.add(self, name: "RichDocumentsMobileInterface")