简体   繁体   中英

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. 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. This is an instance of UINavigationItem ; see the documentation here: UINavigationItem .

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