Hi all,
In my application, I'm presenting a modalViewController with a navigationbar on the top of it, but I'm not able to add barbuttons to the navigatiobar. I'm using following code:
EDIT:
displayController = [[UIViewController alloc]initWithNibName:nil bundle:nil];
UINavigationController *cntrol = [[UINavigationController alloc] initWithRootViewController:displayController];
[displayController setTitle:@"TEST"];
UIBarButtonItem *submit = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
action:@selector(displayViewForPosts)];
displayController.navigationItem.rightBarButtonItem = submit;
[submit release];
UIBarButtonItem *newsfeed = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
action:@selector(displayViewForPosts)];
displayController.navigationItem.leftBarButtonItem = newsfeed;
[newsfeed release];
[self presentModalViewController:cntrol animated:YES];
[cntrol release];
[displayController release];
Thanx in advance.