ios - how to add done button on uidatepicker -
uidatepicker *datepicker = [[uidatepicker alloc]init]; [datepicker setdate:[nsdate date]]; [datepicker addtarget:self action:@selector(updatetextfield:) forcontrolevents:uicontroleventvaluechanged]; [txt_time setinputview:datepicker]; uibarbuttonitem *barbutton=[[uibarbuttonitem alloc]initwithtitle:@"done" style:uibarbuttonitemstylebordered target:self action:@selector(addordeleterows)];
how add done button on top of uidatepicker when press on textfield uidatepicker show after enter date done button show.after clicked on done button uidatepicker should hide
of answer on stackoverflow how add done button date picker, one: display uidatepicker in uiactionsheet when tapping on uitextfield helpful. achieves desired result minimum code , custom configuration.
Comments
Post a Comment