How to Make a Toolbar with UIToolbar

Matthew Campbell, November 9th, 2009

Toolbars are used to present a set of functions to a user. You will see these at the bottom of iPhone apps and generally give you the option to do things like edit files, send email or take a picture. Here is an example of what a toolbar will look like in an iPhone app:

Yes-Im-Fresh.jpg

Today, I am going to show you how to use UIToolbar in your iPhone apps. Essentially, what you need to do is to create an instance of UIToolbar, add buttons to it and then add the toolbar to your view. Usually, you will also need to assign actions to each toolbar button as well.

Here is video of how to use UIToolbar taken from my own code library that I ship with my ebook:

Source Code for Using UIToolbar

Discuss in the comments below!