O'Reilly logo

Mac Application Development by Example Beginner's Guide by Robert Wiebe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – implementing the Toolbar delegate

Similar to a table view, we need to implement a delegate for our toolbar. Again, as its name implies, the toolbar delegate will implement behaviors on behalf of the GUI object.

  1. From the File menu, select New, then select New File… and create a new class named BTS_NCToolbarDelegate that will be used to manage the table views.
  2. Select the MainMenu.xib file and create a new object from the Object Library.
  3. Change the name of the new object to BTS_NCToolbarDelegate.
  4. Change the class of the new object to BTS_NCToolbarDelegate.
  5. In the .xib file, connect the Toolbar object to the BTS_NCToolbarDelegate object and select delegate from the Outlets menu as shown in the following screenshot:
  6. In BTS_NCToolbarDelegate.h ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required