ios - How to give a button iPhone onScreenKeyboard return key behaviour? -


i have application have implement customised quicktype suggestion @ top of onscreen keyboard. where(quicktype suggestion box) right button behaviour keyboard return type behaviour. if keyboard return key "next" suggestion's right key "next", if "done" has "done" along type action. had attested 3 buttons along top of keyboard when it's appear. can't figure out, how work it? possible trick? , how? if, there ways that, please suggest.

enter image description here

okey first need know type of keyboard button , if button next text fields should have unique tag foreach 1 :

-(ibaction)didtaponcustomnextbutton:(id)sender {     uitextfield * textfield = (uitextfield *)sender ;      if(textfield.returnkeytype == uireturnkeynext)     {        nsinteger nexttextfield = textfield.tag+1;         uiresponder* responder = [textfield.superview viewwithtag:nexttextfield];         if (responder!=nil)         {           [responder becomefirstresponder];        }         else         {          [textfield resignfirstresponder];        }     }     else     {        [textfield resignfirstresponder];     }  } 

edit 1: edited code work in ibaction , fixed variables names


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -