Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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.
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.