How to display UIDatePicker if user hit the UITextfield Programmatically

后端 未结 7 1315
刺人心
刺人心 2021-02-05 14:31

I\'d like to Display UIDatePicker only when user the UITextField is Clicked. When the date is picked, it should be shown in the same UITextField.I want to implement UIDatePicker

7条回答
  •  伪装坚强ぢ
    2021-02-05 15:15

    First make userIntraction enable

    [txtDOB setUserInteractionEnabled:YES];

    and add your picker view as input view of this text filed

    [txtDOB setInputView:pickerview]

提交回复
热议问题