ios - The keyboard does not hide with two UITextField with one who calls a picker -
i have 2 uitexfield, 1 normal , second calls custom picker. problem is, when put text in first uitextfield , after tap on second call picker, keyboard doesn't hide.
my code:
-(void)textfielddidbeginediting:(uitextfield *)textfield{ if (textfield.tag == 5) {//uitextfield call picker [tfnumber resignfirstresponder]; [tfdate resignfirstresponder]; datepicker = [[andatepickerview alloc]initwithsuperview:self.view delegate:self]; [datepicker appears]; } } the picker appears bellow keyboard.
where de problem ?
try code:
- (bool)textfieldshouldbeginediting:(uitextfield *)textfield; { if (textfield.tag == 5) { datepicker = [[andatepickerview alloc]initwithsuperview:self.view delegate:self]; [datepicker appears]; return no; } return yes; }
Comments
Post a Comment