Я создал программно UINavigationBar, но он не отображается, что сделать чтоб он отобразился с кнопкой стиля UIBarButtonSystemItemUndo?
- (void)viewDidLoad
{
nnavBar = [[UINavigationBar alloc]initWithFrame:CGRectMake(0.0, 20.0, 320.0, 44.0)];
nnavBar.barStyle = UIBarStyleBlack;
nnavBar.tintColor = [UIColor colorWithRed:0.6f green:0.0f blue:0.0f alpha:1.0];
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemUndo target:nil action:@selector(doneInfoView)];
self.navigationItem.leftBarButtonItem = backButton;
}
-(void) doneInfoView
{
[self dismissModalViewControllerAnimated:YES];
}