Tab Bar Controllers
View controllers become more interesting when the user has a way to switch between them. Throughout this book, you will learn a number of ways to present view controllers. In this chapter, you will create a UITabBarController that will allow the user to swap between the UIViewController displaying the conversion labels and the UIViewController displaying the map.
UITabBarController keeps an array of view controllers. It also maintains a tab bar at the bottom of the screen with a tab for each view controller in its array. Tapping on a tab presents the view of the view controller associated with that tab.
Open Main.storyboard and select the map view controller. From Xcode’s Editor menu, choose Embed In → Tab Bar ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access