I'm relatively new to iOS programming but I'm learning bit by bit. I've got two nib files, one is my HomeViewController and the other is called 'ReceiptTableViewController'. The HomeVC should not have a top nav bar but the ReceiptTableVC should, with a title and 'back' where the user can swipe to go back to HomeVC.
How would I go about adding this? I've dragged the Navigation Controller to the side of my ReceiptTableVC in the nib file.
I've searched for various answers but some contradict each other as the authors use different versions of Xcode, and some start with storyboards, etc.
Any help is much appreciated!
- I haven't used storyboard
You can use this method to decide whether your navigationBar show or not in your viewController.
[self.navigationController setNavigationBarHidden: animated:];
In your
AppDelegate
:Then in your
ReceiptTableViewController
's viewDidLoad method:This is how to declare a
UINavigationController
programmatically. You can have a try.