equal
deleted
inserted
replaced
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) |