Преглед на файлове

improved code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana преди 2 години
родител
ревизия
872b0ec6c4
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      iOSClient/ScanDocument/NCScan.swift

+ 1 - 2
iOSClient/ScanDocument/NCScan.swift

@@ -355,8 +355,7 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
             if let recognizerView = recognizer.view, let recognizerSuperView = recognizerView.superview, pasteboard.hasImages {
 
                 UIMenuController.shared.menuItems = [UIMenuItem(title: "Paste", action: #selector(pasteImage))]
-                UIMenuController.shared.setTargetRect(recognizerView.frame, in: recognizerSuperView)
-                UIMenuController.shared.setMenuVisible(true, animated: true)
+                UIMenuController.shared.showMenu(from: recognizerSuperView, rect: recognizerView.frame)
             }
 
             // TIP