Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有可能为工具栏设置固定位置,例如:
在我的 UIViewController 中,我得到了一个 UITableView 和一个 UIToolbar。如果表格视图有 50 行,我如何设置工具栏始终位于视图的底部,这样我就不必先向下滚动才能到达工具栏。工具栏应随时显示。
我希望你知道我的意思,并提前感谢你的回答。 肖恩
如果您有 UINavigationController,并且不需要 2.x 兼容性,则应使用该toolbarItems属性创建附加到控制器的工具栏。
toolbarItems
另请参阅将 ToolBar 添加到 UITableView 的正确方法是什么?.