From 12dd2ea9e4959d5b00a8a6d6f3dfbc6880050624 Mon Sep 17 00:00:00 2001 From: vducastel Date: Mon, 6 Feb 2023 16:08:23 +0100 Subject: [PATCH 1/2] Rename method "handle(_ gestureRecognizer: UIGestureRecognizer)" due to the conflict with the validation apple --- Sources/XCoordinator/GestureRecognizerTarget.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/XCoordinator/GestureRecognizerTarget.swift b/Sources/XCoordinator/GestureRecognizerTarget.swift index 854dadd6..65681fe8 100755 --- a/Sources/XCoordinator/GestureRecognizerTarget.swift +++ b/Sources/XCoordinator/GestureRecognizerTarget.swift @@ -23,13 +23,14 @@ internal class Target: GestureRecognizer init(recognizer gestureRecognizer: GestureRecognizer, handler: @escaping (GestureRecognizer) -> Void) { self.handler = handler self.gestureRecognizer = gestureRecognizer - gestureRecognizer.addTarget(self, action: #selector(handle)) + // The method signature "handle(_ gestureRecognizer: UIGestureRecognizer)" is in conflict with validation Apple, use another name : "handleMyGesture" + gestureRecognizer.addTarget(self, action: #selector(handleMyGesture)) } // MARK: Target actions @objc - private func handle(_ gestureRecognizer: UIGestureRecognizer) { + private func handleMyGesture(_ gestureRecognizer: UIGestureRecognizer) { guard let recognizer = gestureRecognizer as? GestureRecognizer else { return } handler(recognizer) } From 42ec07bbd271fcc9c6eae3f878ec02fdf8059d69 Mon Sep 17 00:00:00 2001 From: vducastel Date: Thu, 23 Feb 2023 14:17:27 +0100 Subject: [PATCH 2/2] rename method to handleGesture(of: ) --- Sources/XCoordinator/GestureRecognizerTarget.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/XCoordinator/GestureRecognizerTarget.swift b/Sources/XCoordinator/GestureRecognizerTarget.swift index 65681fe8..69907be7 100755 --- a/Sources/XCoordinator/GestureRecognizerTarget.swift +++ b/Sources/XCoordinator/GestureRecognizerTarget.swift @@ -24,13 +24,13 @@ internal class Target: GestureRecognizer self.handler = handler self.gestureRecognizer = gestureRecognizer // The method signature "handle(_ gestureRecognizer: UIGestureRecognizer)" is in conflict with validation Apple, use another name : "handleMyGesture" - gestureRecognizer.addTarget(self, action: #selector(handleMyGesture)) + gestureRecognizer.addTarget(self, action: #selector(handleGesture(of: ))) } // MARK: Target actions @objc - private func handleMyGesture(_ gestureRecognizer: UIGestureRecognizer) { + private func handleGesture(of gestureRecognizer: UIGestureRecognizer) { guard let recognizer = gestureRecognizer as? GestureRecognizer else { return } handler(recognizer) }