LoginSignup
1
1

More than 5 years have passed since last update.

[iOS] A simple way to add touch event for the UIView

Posted at

If you want to add a touch event to the UIView.

Here is a simple way to do this.

  • First set the view custom class to UIControl.

Screen Shot 2015-08-29 at 20.15.27.png

  • Then drag the Touch Up Inside event to the code area on the connections inspector.

Screen Shot 2015-08-29 at 20.20.35.png

  • That's all.
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1