r4id4 r4id4 - 1 month ago 12
iOS Question

Edit navigation bar in storyboard after segue

I have the following situation with 2

View Controllers
(A & B), where A is embedded in a
Navigation Controller
and there is a
show segue
that connects A to B.

enter image description here
I am able to play with the A's
Navigation Bar
, setting the title and adding buttons from the storyboard. But this is not true for B, I can only make edits programmatically

self.title = "VCB"


works and displays the title beside the back button of the navigation controller to A), but I cannot physically select the
Navigation Bar
to set a Title or add BarButton from storyboard.


I was just wondering if there is a way to edit B's
Navigation Bar
from the storyboard?

Answer

There are workaround

  1. just add new Navigation Controller for B

  2. write the Title and put any buttons in B Navigation Bar

  3. Delete the new Navigation Controller for B

Done