iOS 9 Swift Segue from TextField -


i trying start uiactivityindicator user clicks "enter" on uitextfield. since once hit enter app fetches information stored in web, user know app working.

the web fetch happens inside shouldperformseguewithidentifier function, given based on results segue or not happen.

so, order of methods called starting when user clicks on return key. want start uiactivityindicator @ exact moment. tried "textfielddidendediting , textfieldshouldreturn" both of them happen after prepareforsegue , shouldperformseguewithidentifier.

thanks lot in advance.

why not call code in textfieldshouldreturn itself?

func textfieldshouldreturn(textfield: uitextfield) -> bool {     activityindicator.startanimating()     //do web stuff     if shouldperformsegue == true {         self.performseguewithidentifier("some identifier", sender: self)     }     return true } 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -