cocoaTouch/SingleTeamViewController.m
changeset 3361 cfc6cd502f85
parent 3352 ac5d14a35482
child 3364 e5403e2bf02c
equal deleted inserted replaced
3360:717b4e46e855 3361:cfc6cd502f85
    70                                                                      style:UIBarButtonItemStyleDone
    70                                                                      style:UIBarButtonItemStyleDone
    71                                                                     target:self
    71                                                                     target:self
    72                                                                     action:@selector(save:)];
    72                                                                     action:@selector(save:)];
    73     self.navigationItem.rightBarButtonItem = saveButton;
    73     self.navigationItem.rightBarButtonItem = saveButton;
    74     [saveButton release];
    74     [saveButton release];
    75 }
       
    76 
       
    77 // we save every time a textfield is edited, so we don't risk to update only the hogs or only the temname 
       
    78 -(BOOL) textFieldShouldEndEditing:(UITextField *)aTextField {
       
    79     return [self save:nil];
       
    80 }
    75 }
    81 
    76 
    82 // the textfield has been modified, check for empty strings and restore original navigation bar
    77 // the textfield has been modified, check for empty strings and restore original navigation bar
    83 -(void) textFieldDidEndEditing:(UITextField *)aTextField{
    78 -(void) textFieldDidEndEditing:(UITextField *)aTextField{
    84     if ([textFieldBeingEdited.text length] == 0) 
    79     if ([textFieldBeingEdited.text length] == 0)