How to add uitoolbar to uitableviewcontroller?

Posted by Jakub on Stack Overflow See other posts from Stack Overflow or by Jakub
Published on 2010-03-28T18:29:03Z Indexed on 2010/03/28 18:33 UTC
Read the original article Hit count: 327

Filed under:
|

I have an UITableViewController which I would like to add UIToolbar to with one button. In the

- (void)viewDidLoad;

method of UITableViewController I have:

- (void)viewDidLoad {
[super viewDidLoad];

UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
                                                                             target:self
                                                                             action:@selector(pressButton1:)];

self.navigationItem.title = @"Some title";
self.navigationItem.leftBarButtonItem = button;
 }

Unfortunately I don't see the toolbar when I run my app. Any hints? Should I do something more?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk