I create a sibling UITextField, but instead of UIDatePickera keyboard instead.
I want several of these controls to play well with each other, as well as the standard one UITextField(for example, a swap keyboard to select the date when my control is activated, and hide the date picker when the text field is activated).
One thing that bothers me is managing the status of the first responder. UIDatePickerdoesn't seem to be asking to be the first responder. Should it? Can I rely on him not becoming the first defendant and hiding the date picker when my own control is asked to dismiss the first defendant?
Should I set UIDatePicker(or something else) as my control nextResponder? I don’t want to handle any events, I just want to make sure that my control is stealing and resigning if necessary.
(in this case I do not use nibs)
source
share