Toolbar : for a TableView?



In this chapter, we have added a toolbar to our DetailView using a XIB. That’s fine.

Now let’s suppose I wanted to add a toolbar to the ItemView (managed by a ItemViewController) instead. How would I do that ?

  • should I do that programmatically, activating the default-hidden toolbar managed by the navigation controller ? (but in that case, I have to do everything programmatically, including the barButtonItems)
  • or should I use a XIB, but in that case I need to start from a View, add a tableView and a ToolBar, thus losing a TableViewController (the ViewController becomes the tableView datasource and delegate) ? If I don’t have a TableViewController, I lose the possibility to use “integrated” tools, like RefreshControl (usable only with a TableViewController, right ?), or the already built-in “Edit” button …

What would you advice ?