Remove unused long press gesture recognizer
This commit is contained in:
parent
e50b9e13a6
commit
e16185fa71
|
@ -15,7 +15,6 @@ import VisionKit
|
|||
|
||||
protocol MediaPreviewImageViewControllerDelegate: AnyObject {
|
||||
func mediaPreviewImageViewController(_ viewController: MediaPreviewImageViewController, tapGestureRecognizerDidTrigger tapGestureRecognizer: UITapGestureRecognizer)
|
||||
func mediaPreviewImageViewController(_ viewController: MediaPreviewImageViewController, longPressGestureRecognizerDidTrigger longPressGestureRecognizer: UILongPressGestureRecognizer)
|
||||
func mediaPreviewImageViewController(_ viewController: MediaPreviewImageViewController, contextMenuActionPerform action: MediaPreviewImageViewController.ContextMenuAction)
|
||||
}
|
||||
|
||||
|
@ -31,7 +30,6 @@ final class MediaPreviewImageViewController: UIViewController {
|
|||
let previewImageView = MediaPreviewImageView()
|
||||
|
||||
let tapGestureRecognizer = UITapGestureRecognizer.singleTapGestureRecognizer
|
||||
let longPressGestureRecognizer = UILongPressGestureRecognizer()
|
||||
|
||||
deinit {
|
||||
os_log("%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)
|
||||
|
@ -58,13 +56,9 @@ extension MediaPreviewImageViewController {
|
|||
|
||||
tapGestureRecognizer.addTarget(self, action: #selector(MediaPreviewImageViewController.tapGestureRecognizerHandler(_:)))
|
||||
tapGestureRecognizer.delegate = self
|
||||
longPressGestureRecognizer.addTarget(self, action: #selector(MediaPreviewImageViewController.longPressGestureRecognizerHandler(_:)))
|
||||
longPressGestureRecognizer.delegate = self
|
||||
tapGestureRecognizer.require(toFail: previewImageView.doubleTapGestureRecognizer)
|
||||
tapGestureRecognizer.require(toFail: longPressGestureRecognizer)
|
||||
previewImageView.addGestureRecognizer(tapGestureRecognizer)
|
||||
previewImageView.addGestureRecognizer(longPressGestureRecognizer)
|
||||
|
||||
|
||||
let previewImageViewContextMenuInteraction = UIContextMenuInteraction(delegate: self)
|
||||
previewImageView.addInteraction(previewImageViewContextMenuInteraction)
|
||||
|
||||
|
@ -95,11 +89,6 @@ extension MediaPreviewImageViewController {
|
|||
delegate?.mediaPreviewImageViewController(self, tapGestureRecognizerDidTrigger: sender)
|
||||
}
|
||||
|
||||
@objc private func longPressGestureRecognizerHandler(_ sender: UILongPressGestureRecognizer) {
|
||||
os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)
|
||||
delegate?.mediaPreviewImageViewController(self, longPressGestureRecognizerDidTrigger: sender)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension MediaPreviewImageViewController: MediaPreviewPage {
|
||||
|
|
|
@ -273,10 +273,6 @@ extension MediaPreviewViewController: MediaPreviewImageViewControllerDelegate {
|
|||
}
|
||||
}
|
||||
|
||||
func mediaPreviewImageViewController(_ viewController: MediaPreviewImageViewController, longPressGestureRecognizerDidTrigger longPressGestureRecognizer: UILongPressGestureRecognizer) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
func mediaPreviewImageViewController(
|
||||
_ viewController: MediaPreviewImageViewController,
|
||||
contextMenuActionPerform action: MediaPreviewImageViewController.ContextMenuAction
|
||||
|
|
Loading…
Reference in New Issue