iPhone datepicker instead of keyboard?

后端 未结 5 762
星月不相逢
星月不相逢 2020-12-07 17:43

How would you do that?

I have a form with a UITextField. When I click in it I would like to display a UIDatePicker instead of the default Keyboard that pops-up by de

5条回答
  •  时光取名叫无心
    2020-12-07 18:39

    (IBAction)estableceHora:(id)sender{
       Hora = horaPicker.date;
       NSDateFormatter *hf = [[NSDateFormatter alloc] init];
       [hf setDateFormat:@"HH:MM"];
       [self.txtHora setText:[hf stringFromDate:Hora]];
    }
    

提交回复
热议问题