Reputation: 161
Newbie here.
I'm creating a link between two views. The first view Current Books contains a list of books, and a + button which when clicked takes you to a new view called Add Book.
This is what it looks like before I add a segue between these two views.
This is what it looks like after I add a segue between these two, connected by the +
As you can see, the title 'Add Book' of my second activity goes invisible upon adding the segue. How would I get it to be visible again?
I also noticed that upon double clicking of the position of the invisible title, I am able to edit the title's text but it still won't make it appear! Please help!
Upvotes: 0
Views: 164
Reputation: 139
Swift --> self.navigationController?.isNavigationBarHidden = true
Objective C --> [self.navigationController setNavigationBarHidden:YES];
add line on Add Book ViewController
Upvotes: 0
Reputation: 1481
It seems that you added your own navigation bar in AddBookViewController scene of Storyboard. if so, just delete that navigation bar then drag segue from CurrentBooks +
button, now select your AddBookViewController in Storyboard
then select show attribute inspector, and change your ViewController title.
Thank you.
Upvotes: 1
Reputation: 401
You can setup title programatically in AddBookViewController.
self.title = "The title you want"
Put this in View Did Load
Upvotes: 0