문제

I have a toolbar on top of the keyboard with a prev and next button. When I press the next button the next textfield should become first responder but this doesn't happen. Here is my code.

-(IBAction) nextfield {
    if([name isFirstResponder] == TRUE) {
        [name resignFirstResponder];
        [surname becomeFirstResponder];
        if(surname.editing == TRUE)
            NSLog(@"surname");
    }
    if([surname isFirstResponder] == TRUE) {
        [email becomeFirstResponder];
    }
    if([email isFirstResponder] == TRUE) {
        [password becomeFirstResponder];
    }
    if([password isFirstResponder] == TRUE) {
        [confirm becomeFirstResponder];
    }
    if([confirm isFirstResponder] == TRUE) {
        [country becomeFirstResponder];
    }
    if([country isFirstResponder] == TRUE) {
        if(country.text == @"United States") {
            [state setEnabled:TRUE];
            [state becomeFirstResponder];
        }
        else {
            [type becomeFirstResponder];
        }
    }
    if([state isFirstResponder] == TRUE) {
        [type becomeFirstResponder];
    }
    if ([type isFirstResponder] == TRUE) {
        [name becomeFirstResponder];
    }
}

I get in Log "surname" but the cursor doesn't show up and if i type something it doesn't appear anywhere.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top