소스 검색

Update NCContextMenu.swift

Marino Faggiana 1 년 전
부모
커밋
226756942c
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      iOSClient/Menu/NCContextMenu.swift

+ 6 - 1
iOSClient/Menu/NCContextMenu.swift

@@ -151,7 +151,12 @@ class NCContextMenu: NSObject {
 
         let deleteConfirmFile = UIAction(title: titleDeleteConfirmFile,
                                          image: UIImage(systemName: "trash"), attributes: .destructive) { _ in
-            let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
+
+            var alertStyle = UIAlertController.Style.actionSheet
+            if UIDevice.current.userInterfaceIdiom == .pad {
+                alertStyle = .alert
+            }
+            let alertController = UIAlertController(title: nil, message: nil, preferredStyle: alertStyle)
             alertController.addAction(UIAlertAction(title: NSLocalizedString("_delete_file_", comment: ""), style: .destructive) { _ in
                 Task {
                     var ocId: [String] = []