简体   繁体   English

iPad:UISplitViewController的自定义工具栏

[英]iPad: Custom Toolbar for UISplitViewController

How exactly does one go about implementing a custom toolbar for the main table view section of a split view? 如何为拆分视图的主表视图部分实现自定义工具栏?

The program I am writing for the iPad is landscape only so the split view has a static table view along the left side, and at the top is the toolbar with a title. 我为iPad编写的程序仅是横向的,因此拆分视图的左侧具有静态表格视图,顶部是带有标题的工具栏。 It is this toolbar I would like to change. 我要更改的是此工具栏。 I have created the split view controller, table view controller, and detail view controllers programmatically so I should have reference to the toolbar object. 我已经以编程方式创建了拆分视图控制器,表视图控制器和详细视图控制器,因此我应该参考工具栏对象。 The only thing is I don't know how to reference it so I can overwrite it with my custom toolbar. 唯一的事情是我不知道如何引用它,因此可以使用自定义工具栏将其覆盖。

Is it the split view controller that creates this toolbar? 创建此工具栏的是拆分视图控制器吗? Or the table view? 还是表格视图?

Any ideas? 有任何想法吗?

It's a navigation bar, not a toolbar. 这是一个导航栏,而不是工具栏。 You'll want to investigate the navigationItem property of the UIViewController responsible for the view with the navigation bar. 您将要调查负责使用导航栏进行查看的UIViewController的navigationItem属性。 This is an instance of UINavigationItem ; 这是UINavigationItem的实例; see the documentation here: UINavigationItem . 请参阅此处的文档: UINavigationItem

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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