- (id)initWithStyle:(UITableViewStyle)style
{
appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
if (self = [super initWithStyle:style])
{
NSString *title = [[appDelegate myItem] title];
[self setTitle: title];
[[[self navigationItem] backBarButtonItem] setTitle: title];
toolbar = [UIToolbar new];
[toolbar sizeToFit];
CGFloat toolbarHeight = [toolbar frame].size.height;
CGRect mainViewBounds = [[UIScreen mainScreen] applicationFrame];
[toolbar setFrame:CGRectMake(CGRectGetMinX(mainViewBounds), CGRectGetMinY(mainViewBounds) + CGRectGetHeight(mainViewBounds) - 108.0, CGRectGetWidth(mainViewBounds), toolbarHeight)];
[self createToolbarItems];
[self.view addSubview:toolbar];
}
return self;
}