简体   繁体   中英

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.

在此处输入图片说明

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.

在此处输入图片说明

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?


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 (eg Push)' then in next view you won't get navigation bar.
在此处输入图片说明 You need to add navigation bar and then add bar button item to navigation bar. 在此处输入图片说明在此处输入图片说明 Hope your problem will be solved.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM