jquery - Shift focus to next field when Enter is pressed -
i facing problem in shifting focus next textfield in ipad.
scenario :
[textfield1] [textfield2]
when enter pressed on textfield1 shift focus textfield2.
i have googled workarounds , tried them nothing works.
please me on this.
easiest way set tag property of textfields then
- (void)textfieldshouldreturn:(uitextfield *)textfield { uitextfield *nextfield = (uitextfield*)[self.view viewwithtag:textfield.tag + 1]; // if textfield tag exist make first responder if(nextfield) { [nextfield becomefirstresponder]; } else { // hide keyboard [self.view endediting:yes]; } return yes; }
Comments
Post a Comment