Skip to content

Commit

Permalink
Rename method "handle(_ gestureRecognizer: UIGestureRecognizer)" due …
Browse files Browse the repository at this point in the history
…to the conflict with the validation apple
  • Loading branch information
vducastel committed Feb 6, 2023
1 parent de2232b commit 12dd2ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/XCoordinator/GestureRecognizerTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ internal class Target<GestureRecognizer: UIGestureRecognizer>: 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)
}
Expand Down

0 comments on commit 12dd2ea

Please sign in to comment.