3
votes

I'm still struggling with navigation bars and just can't work out how to edit or verify that I have a navigation bar on my view and I would appreciate any help.

I have a project with another set of scenes similarly comprising of a navigation controller and three associated view controllers (connected via segues and main table view embedded in the navigation controller) and I was able to add a navigation bar manually in interface builder to the outer view controllers that were segued to the table view controller. But in this set of scenes the navigation controller is set up as the root view controller for the table view.

I have another set of scenes. A navigation controller and two related view controllers - both table view controllers. I embedded the first table view controller in the navigation controller and I then added a second table view controller to this (for a new screen I want to add to my app) and I connected this second table view controller to my first table view controller by way of a show segue (just like I did yesterday with other set of scenes). Can I set this other navigation controller as the root controller also? Like, can I have two root view controllers in a project?

It looks to me like there is a navigation bar visible (see screenshot below) on my new table view controller but I can't click in to it to edit it to add a title to it. But does a navigation bar and exist, and if so, why can't I click inside it and use it?

I was told in an answer to a previous question that you have to add a navigation bar manually to your storyboard scene to any additional view controllers. I did that yday and it worked. But today when I tried to add a navigation bar by dragging onto scene it wouldn't let me do this.

Here is the screenshot: enter image description here

3

3 Answers

6
votes

Try adding push segue(which is depreciated) and than change it to a show segue(between your tableviews). This is a workaround I use in my apps.

0
votes

Ran into the same problem. Had a good fallback position, I am doing a tutorial that came with example programs completed and working so the first thing I did was see if it was a version glitch between 6.3.2 and 6.4. Turned out the earlier project worked just fine.

So what I did was simply drag the 'Item' in the sidebar and moved it under the Root View Controller!

0
votes

I've experienced the same issue.

However, by saving and closing the project then reopening it, the Navigation Bar title is then able to be edited. Prior to closing/reopening the project the field could not be edited.