Question: I am writing an app that has a form and allows you to email the form data to a computer for further editing. The form is implemented using UITextfield's, and functions correctly assuming you don't enter the "enter/return" key. If that happens, the app crashes in the simulator, or freezes on my iPad, and gives me the following message as output:

```
[FirstTableViewController hideKeyboard:]: unrecognized selector sent to instance 0x151cb800

```

The hideKeyboard method does not exist anywhere in my code. I'm not sure at this point if it would be useful to post code, because I don't know where in the code it is happening. I tried creating an exception breakpoint, but it does not appear to be giving an information as far as where the app is crashing. 

If I could get some tips on how to debug my code better, that would be great. If I get to a point where I find where the error is occurring, and can't figure it out myself, I'll update this post with the code needed. 

Thanks.

Answer: 
A nice way to debug a case like this is to add the reported unrecognized selector to the class that is being called. If it is a library class, subclass it and just add the single selector in question.

Then put a break point in the implementation, and look at the back trace when the break point is reached.
Most likely you added a selector to an event:

```
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
                                                                                            target:self
                                                                                            action:@selector(hideKeyBoards)] autorelease];

```

But forgot to implement the method itself