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

javascript - Trigger mouseenter when an animated element touches mouse -

json - Zend error Connection -

java - Using Spring @Transactional with a combination of readOnly and write, when does this entity get committed? -