Silver challenge clean method


#1

Hi Guys

I posted my solution for the silver challenge.
This solution hide keyboard when you touch the background and when you touch Done.

put the code in detailViewController.m

This is for hide keyboard when hit the background

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    
    [serialNumberField resignFirstResponder];
    [nameField resignFirstResponder];
    [valueField resignFirstResponder];
    
}[/code]


And this is for when you click on Done :

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

Then go in the xib and link the sent event Did End On Exit to DissmissKeyboard in the connection outlet.

Enjoy