Graphics Programs Reference
In-Depth Information
The header view will appear at the top of the list of
BNRItem
s. It will have two subviews
that are instances of
UIButton
: one to toggle editing mode and the other to add a new
BNRItem
to the table. You will create this view and its subviews in a XIB file, and
ItemsViewController
will unarchive that XIB file when it needs to display the
header view.
First, let's set up the necessary code. Reopen
Homepwner.xcodeproj
. In
Item-
sViewController.h
, declare an instance variable of type
UIView
for your header
view and three new methods.
@interface ItemsViewController : UITableViewController
{
IBOutlet UIView *headerView;
}
- (UIView *)headerView;