Navigation bar is missing while pushing kalviewcontroller on button click.How to add navigation bar? so that it can be pop to view controller where its being pushed on button click.
kal = [[[KalViewController alloc] init]autorelease];
kal.title = @"Calendar of game";
kal.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self
action:@selector(addEvent)] autorelease];
kal.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Back"
style:UIBarButtonItemStyleBordered target:self action:@selector(backToPrevious)]
autorelease];
kal.delegate = self;
dataSource = [self init];
kal.dataSource = dataSource;
[self.navigationController pushViewController:kal animated:YES];
Put
[self.navigationController setNavigationBarHidden:FALSE]in youviewDidLoad(assuming you have created navigation controller).