marinofaggiana 5 年之前
父節點
當前提交
f84e990961
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      iOSClient/Share/NCSharePaging.swift

+ 2 - 1
iOSClient/Share/NCSharePaging.swift

@@ -126,11 +126,12 @@ extension NCSharePaging: PagingViewControllerDataSource {
     func pagingViewController<T>(_ pagingViewController: PagingViewController<T>, viewControllerForIndex index: Int) -> UIViewController {
         
         let height = pagingViewController.options.menuHeight + NCSharePagingView.HeaderHeight
+        let topSafeArea = UIApplication.shared.keyWindow?.safeAreaInsets.top ?? 0
         
         switch index {
         case 0:
             let viewController = UIStoryboard(name: "NCActivity", bundle: nil).instantiateInitialViewController() as! NCActivity
-            viewController.insets = UIEdgeInsets(top: height, left: 0, bottom: 0, right: 0)
+            viewController.insets = UIEdgeInsets(top: height - topSafeArea, left: 0, bottom: 0, right: 0)
             viewController.didSelectItemEnable = false
             viewController.filterFileId = metadata!.fileId
             viewController.objectType = "files"