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