Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CustomView: UIView {
- override public func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
- if let hitView = super.hitTest(point, with: event), !hitView.isKind(of: UIButton.self) {
- return hitView
- } else {
- return nil
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement