Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Storyboard issue - Button Bar Button only appears at the bottom of a TableViewController

Not sure if this is a bug in Xcode 6(I use Beta 4) or expected behaviour.

When I have a View Controller in a Navigation Controller and 'push' (deprecated segue) a Table View Controller(TVC) I can drag a Bar Button Item to the Navigation Bar in the TVC.

enter image description here

When I do the same but 'show' (new adaptive segue) the TVC, the Bar Button Item drops to the bottom, and in fact doesn't show up when I build the project.

enter image description here

A hack to resolve this problem is to set it up as 'Push' to begin with, drag on the Bar Button Item, and then change the segue to 'Show'. But - is this necessary? Is this an Xcode Bug or am I missing something?

like image 858
Craig Grummitt Avatar asked Jul 27 '14 17:07

Craig Grummitt


Video Answer


2 Answers


I have tried creating the issue you are facing with bar button at bottom. It’s not an issue or Xcode bug.
But in new Xcode when you use segue to ’Show (e.g. Push)’ then in next view you won’t get navigation bar.
enter image description here You need to add navigation bar and then add bar button item to navigation bar. enter image description hereenter image description here Hope your problem will be solved.

like image 193
Dhaivat Vyas Avatar answered Oct 12 '22 01:10

Dhaivat Vyas


I had the same issue and fixed it by simply selecting the view controller and changing the "Top Bar" to "Opaque Navigation Bar" from Inferred. This let me add the Bar Button Item on top.

like image 43
Sanchal Kunnel Avatar answered Oct 12 '22 01:10

Sanchal Kunnel