Created
March 30, 2016 06:46
-
-
Save pigfly/cc9d7ca4c69aec870d1d0f3c8c40dd4d to your computer and use it in GitHub Desktop.
This file contains 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
class CustomButton: UIButton { | |
override func hitTest(point: CGPoint, withEvent event: UIEvent?) -> UIView? { | |
let newPoint = self.layer.presentationLayer()!.convertPoint(point, fromLayer: layer) | |
return super.hitTest(newPoint, withEvent: event) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment