I have a class I call InputView that is a subclass of UIView
that contains a UITextField
and a UILabel
. Due to how my InputView is designed, I have it implement the UITextFieldDelegate
protocol so I can do a bunch of things when its UITextField
is edited.
I then have a View Controller that has multiple InputView's in it. I want to create a new InputView whenever the first InputView in the VC is filled up. Now I could do this using a simple check in the function that is called when a UITextField
ends editing, and just check if the InputView is filled up or not, but as I said, InputView already implements the UITextFieldDelegate
protocol.
I want to "send" a signal from an InputView, that I can catch in my VC and then run a function that creates a new InputView. If you're confused, see the following image: