Constraint controls greyed out in Xcode (pinning toolbar to bottom)

ぃ、小莉子 提交于 2019-12-24 10:55:24

问题


I have a toolbar that I want to pin to the bottom. I was trying to use Storyboard rather than code to do it.

When I command + drag from the toolbar to the controller, all I get is a delegate option rather than the option to pin to each other.

How do I add constraints to pin this toolbar to the bottom of the view controller?

Here's my updated view controller flow. Not sure if I need the second navigation controller.


回答1:


So it looks like you want a table view and a toolbar in the same window. The way to set that up in Xcode is to use a navigation interface, because it has a toolbar. You aren't going to be doing any navigating, perhaps, but that's not important. Start with a navigation interface, and have the table view controller as its child (its root view controller). Now configure the navigation view controller so that the navigation bar is not showing but the toolbar is.

(Of course, if you are already in a navigation interface, then just show its toolbar and you're there.)

No constraints are involved.



来源:https://stackoverflow.com/questions/27664129/constraint-controls-greyed-out-in-xcode-pinning-toolbar-to-bottom

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!