Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Hour 13. Advanced Storyboards Using Navi... > Using a Tab Bar Controller

Using a Tab Bar Controller

In our second mini-project of the hour, we create an application with a tab bar controller that manages three individual scenes. Like the last project, each scene has a button to increment a counter, but these counters are unique for each scene (and visible in each scene’s view). We even set the tab bar item’s badge to that scene’s counter. Again, we demonstrate the use of this custom controller and how scenes can share information through the controller class.

Figure 13.15 shows the result we’re going for.

Figure 13.15 We will create a tab bar application with centrally stored properties.

Image

Implementation Overview

We start with a cleaned-out Single View Application template. In this application, we add a tab bar controller and two custom classes: one a subclass of a tab bar controller to manage the application’s properties, and the other a subclass of a view controller to manage the display of the other three views.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial