Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.38 KB | None | 0 0
  1. /**
  2.  Represents a custom button including a touch object.
  3.  */
  4. class TouchReporterButton: UIButton {
  5.  
  6.     // MARK: - Public Properties
  7.    
  8.     var touch: UITouch?
  9.    
  10.     // MARK: - Public Methods
  11.    
  12.     override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
  13.         super.touchesBegan(touches, with: event)
  14.         touch = touches.first
  15.     }
  16.    
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement