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

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

Frank
  • 497
  • 1
  • 6
  • 11
  • 1
    Can you link to your source of "Beginning iOS 6 Development" or is it a book or something? Make sure you've got the most up-to-date version. When tutorials are broken (if it's the author's fault), they tend to get fixed. – Scott Solmer Nov 01 '13 at 16:38

2 Answers2

7

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.

Sergey Kalinichenko
  • 714,442
  • 84
  • 1,110
  • 1,523
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.

Antonio MG
  • 20,382
  • 3
  • 43
  • 62