문제

(IBAction)textFieldDoneEditing:(id)sender{//Expected identifer or ')'
    [sender resignFirstResponder];
}

What's wrong? It's an example from "Beginning iOS 6 Development"

도움이 되었습니까?

해결책 2

Just do this:

-(IBAction)textFieldDoneEditing:(id)sender{//Expected identifer or ')'
    [sender resignFirstResponder];
}

You skipped the - at the beginning, that identifies that there's a method there.

다른 팁

You are missing a minus in front of your declaration:

-(IBAction)textFieldDoneEditing:(id)sender {
    [sender resignFirstResponder];
}

It is not optional - a minus (for the instance methods) or a plus (for the class methods) is required by Objective C syntax.

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