- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
// было
-(BOOL)textFieldShouldReturn:(UITextField *)textField {
if (textField == firstName) {
[lastName becomeFirstResponder];
}
else if (textField == lastName) {
[zip becomeFirstResponder];
}
else if (textField == emailAdr) {
[confirmEmailAdr becomeFirstResponder];
}
else if (textField == confirmEmailAdr) {
[zip becomeFirstResponder];
}
else if (textField == zip) {
[street becomeFirstResponder];
}
else if (textField == street) {
[city becomeFirstResponder];
}
else if (textField == city) {
[telephonNumber becomeFirstResponder];
}
else if (textField == telephonNumber) {
[wachtwoord becomeFirstResponder];
}
else{
[textField resignFirstResponder];
}
return YES;
}
// решил заменить на ( при условии что все текстфилды протаганы от 1 до N):
-(BOOL)textFieldShouldReturn:(UITextField *)textField {
int tag = textField.tag;
UITextField* tf = (UITextField*)[self.scrollView viewWithTag:tag+1];
if ( tf )
[tf becomeFirstResponder];
else
[textField resignFirstResponder];
return YES;
}
guestGovno 01.11.2011 10:43 # −2
jabber 23.11.2011 22:54 # −1
guest 11.10.2013 06:37 # 0