Graphics Programs Reference
In-Depth Information
[self setEditing:NO animated:YES];
} else {
[sender setTitle:@"Done" forState:UIControlStateNormal];
[self setEditing:YES animated:YES];
}
}
Also remove the following code from
ItemsViewController.h
.
@interface ItemsViewController : UITableViewController
{
IBOutlet UIView *headerView;
}
- (UIView *)headerView;
- (IBAction)addNewItem:(id)sender;
- (IBAction)toggleEditingMode:(id)sender;
@end
You can also remove the file
HeaderView.xib
from the project navigator.
Build and run again. The old
Edit
and
New
buttons are gone, leaving you with a lovely
UINavigationBar
(
Figure 11.16
)
.
Figure 11.16 Homepwner with navigation bar