Browse Source

improved code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
872b0ec6c4
1 changed files with 1 additions and 2 deletions
  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