Home Ask Login Register

Developers Planet

Your answer is one click away!

Dhruv Raval February 2016

dynamic DatepickerView and DynamicPicker view for multiple textview

here I am trying to develop a dynamic UIPickerView & UIDatePicker for multiple UITextFields in a UIViewController. In my UIViewController I have five UITextFields and by clicking on every UITextField, I open UIPickerView but my problem is that I want code in which UIPickerView set dynamically in UIViewController. Because here I have also take 5 different date pickerview for that and open it there particular position by showing & hiding each other as per condition.

For example - I have 5 UITextFields in the UIViewController. If I select the second UITextField then the Y position below three UITextFields can be set automatically rather than set frame of every UITextField. Then if I select the fourth UITextField the Y postion of the only fifth UITextField change the three UITextFields above fourth UITextField would not change. For more description I see the attach image:

enter image description here


anup gupta February 2016

use scroll view or autolayout for this type of problem. or you can use table view in which add the text field and pickerview.

Post Status

Asked in February 2016
Viewed 2,127 times
Voted 10
Answered 1 times


Leave an answer

Quote of the day: live life