Hi there, in some scenarios, where you are not using an UINavigationController, you can create a UINavigationBar yourself.
self.navBar = [UINavigationBar new];
self.navBar.contentMode = UIViewContentModeTopLeft;
self.navBar.delegate = self;
self.navBar.frame = CGRectMake(0, 30, mainWindow.frame.size.width,40);
UINavigationItem *backButton = [[UINavigationItem alloc] initWithTitle:@"Back"];
[self.navBar setItems:[NSArray arrayWithObjects:backButton,[[UINavigationItem alloc] initWithTitle:@"Current View"], nil]];
[self.view addSubview: self.navBar];
Your controller should then implement the UINavigationBarDelegate protocol, so that you can respond to
-(BOOL) navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item
where you can go back to your previous view.
There is mostly no use-case for this. You'll probably really want to work with UINavigationControllers and the push- and popViewController methods.
I hope this helped anyway.
kind regards.