Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bar button in Xcode always goes to bottom Xcode 6.3 beta

Tags:

xcode

ios

when i drag the bar button item onto the view controller they will not stay at the top of the view they will automatically go to the bottom under the table view. Does anyone know what is wrong?

like image 945
Mbusi Hlatshwayo Avatar asked Dec 12 '22 00:12

Mbusi Hlatshwayo


2 Answers

You can fix this by moving the bar button item under the navigation item, inside document outline windows.

Before

enter image description here

After

enter image description here

That should fix the issue. I verified the issue in Xcode 6.3.2

like image 63
Shyju Avatar answered Dec 13 '22 12:12

Shyju


If you navigated to this view-controller via a push segue, it does not have an instance of the navigation bar in storyboard.

You need to drag in a "Navigation Item" object, and then you can add your Bar Button Item on to this.

like image 38
vikzilla Avatar answered Dec 13 '22 12:12

vikzilla