Jaffer Sheriff
Jaffer Sheriff

Reputation: 1564

Using constrain for inputView of a UITextField

I have a UITextField and I added inputview to it

 [textField setInputView:inputView];

I added some buttons along with date picker in input view. Input view has UIDatePicker as subview. Since the inputview is not added as subview to any other view, I cannot set height constrain for inputView. How to deal with constrain for inputview of a UITextField.

Upvotes: 0

Views: 237

Answers (1)

Ketan Parmar
Ketan Parmar

Reputation: 27438

I think you not need to set constraint for input view. because it is take default place of keyboard.

You should show date picker as input view and you should take toolbar as inputaccessory view of textfield and add buttons to that tool bar,so you not need to manage layout and it is the standard way also.

Hope this will help :)

Upvotes: 1

Related Questions