Created
October 28, 2016 04:23
-
-
Save markst/6fed3632e243b36baf51b95dcd3e123e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIResponder { | |
func responder(for selector: Selector) -> UIResponder? { | |
if self.responds(to: selector) { | |
return self | |
} | |
if let next = self.next { | |
return next.responder(for: selector) | |
} | |
return nil | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment