Skip to content

Commit

Permalink
rename method to handleGesture(of: )
Browse files Browse the repository at this point in the history
  • Loading branch information
vducastel committed Feb 23, 2023
1 parent 12dd2ea commit 42ec07b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/XCoordinator/GestureRecognizerTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ internal class Target<GestureRecognizer: UIGestureRecognizer>: 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)
}
Expand Down

0 comments on commit 42ec07b

Please sign in to comment.