0

I have picker and toolbar for textfields.

    @IBOutlet var picker: UIDatePicker!
    @IBOutlet var toolbar: UIToolbar!

    @IBOutlet weak var toTF: UITextField!
    @IBOutlet weak var fromTF: UITextField!

and then in viewDidLoad

fromTF.inputView = picker
toTF.inputView   = picker
fromTF.inputAccessoryView = toolbar
toTF.inputAccessoryView   = toolbar

Is it possible to avoid this code and set them in storyboard? (Like you do that for delegates, etc.) I can't find any possibilities.

Zaporozhchenko Oleksandr
  • 4,660
  • 3
  • 26
  • 48

1 Answers1

-1

As far as I can tell, this isn't possible. You can set the views up in your Storyboard/Xib as yo have done, but it looks like the actual connection logic needs to take place in code.

Lizza
  • 2,769
  • 5
  • 39
  • 72