I've been trying to figure this out all day and I feel completely lost.
I have a text field that I'd like to be able to edit using a customized inputView. (For example, a custom inputView that contains a UIDatePicker
with a "done" button to dismiss it, and maybe a couple of other buttons as well.) I'd like to design this inputView in interface builder (in a storyboard or xib), and set it as the text field's inputView.
I cannot figure out what I'm supposed to do to connect everything up. I don't understand how to take buttons in my xib for the custom inputView and wire them up to actions in my main view controller.
I saw a similar question answered here: Add a Done button within a pop-up datePickerView in Swift? but here, the "done" button is constructed programmatically.
Can somebody help me find the most straightforward way to do what I'm trying to do?
Apologies if my question is confusing --- I'm pretty lost right now.