ios - iOS6 Putting Cursor in SPecific Text Field -
i have 3 text input fields clear after user has added data database:
self.textmonth.text = @""; self.texttemp.text = @""; self.textcloud.text = @""; how put cursor in 1 of fields subsequently?
i have tried number of solutions provided elsewhere none seem work. many thanks. eh
just make text field first responder using becomefirstresponder like....
[self.textmonth becomefirstresponder]; to change textfield subsequently use textfieldshouldreturn
- (bool)textfieldshouldreturn:(uitextfield *)textfield { if([self.textmonth isfirstreponder]) { [self.texttemp becomefirstresponder]; } else if([self.texttemp isfirstreponder]) { [self. textcloud becomefirstresponder]; } else if([self.textcloud isfirstreponder]) { [self.textmonth becomefirstresponder]; } return yes; } hope solve problem
Comments
Post a Comment