3

I'm new to Xcode and I assume there's a way to do it but I can't seem to figure it out.

I have made a custom control by subclassing UIView and using IBDesignable.

However, I can't seem to figure out how to send events from within my control to a IBAction outside of it.

Daniel Radtke
  • 307
  • 2
  • 11

1 Answers1

5

You need to subclass UIControl not UIView. Once Interface Builder sees an UIControl subclass then send events section and actions will be available.

Accessing the Control’s Targets and Actions

mfazekas
  • 5,589
  • 1
  • 34
  • 25