Silver and Bronze challenge solution


// Bronze Solution
// Go to IB, Attributes inspector, change Keyboard type from default to “number pad”
// NOTE: change it back for the Silver solution

// Silver Solution
// ////////////

// Make BNRDetailViewController.m conform to UITextFieldDelegate

// @interface BNRDetailViewController ()

// Then Add Bool method in implementation section

  • (BOOL)textFieldShouldReturn:(UITextField *)textField
    [textField resignFirstResponder];
    return YES;

// Addendum: Another solution is to add a UITouch Action so that when the user taps the background,
// the keyboard resigns first responder. This would allow the value field to keep number pad,
// and would probably be a good idea to have in an App that was released.