
- iOS Tutorial
- iOS - Home
- iOS - Getting Started
- iOS - Environment Setup
- iOS - Objective-C Basics
- iOS - First iPhone Application
- iOS - Actions and Outlets
- iOS - Delegates
- iOS - UI Elements
- iOS - Accelerometer
- iOS - Universal Applications
- iOS - Camera Management
- iOS - Location Handling
- iOS - SQLite Database
- iOS - Sending Email
- iOS - Audio & Video
- iOS - File Handling
- iOS - Accessing Maps
- iOS - In-App Purchase
- iOS - iAd Integration
- iOS - GameKit
- iOS - Storyboards
- iOS - Auto Layouts
- iOS - Twitter & Facebook
- iOS - Memory Management
- iOS - Application Debugging
- iOS Useful Resources
- iOS - Quick Guide
- iOS - Useful Resources
- iOS - Discussion
How to create Tab Bar Layout in an iOS App?
In this post we’re going to see how one can use tab bar layout in their application.
As per apple’s documentation −
A tab bar appears at the bottom of an app screen and provides the ability to quickly switch between different sections of an app. Tab bars are translucent, may have a background tint, maintain the same height in all screen orientations, and are hidden when a keyboard is displayed. A tab bar may contain any number of tabs, but the number of visible tabs varies based on the device size and orientation.
You can read more about the same here
https://developer.apple.com/design/human-interface-guidelines/ios/bars/tab-bars/
So let’s get started,
Step 1 − Create a new single view application and name it “TabBarController”
Step 2 − Open your Main.storyboard and add tab view from object library, as shown in the figure
Step 3 − Delete the existing view controller from storyboard, and go to new file and create new file with name, SecondViewController.
Step 4 − Navigate to storyboard and add the classes for both the view controller, for item 1, add ViewController.swift and for item 2 add SecondViewController.swift as shown below
Step 5 − Now change the background color of both the viewcontroller to grey and black.
Step 6 − Do not forget to check in tab bar controller as initial view controller.
Step 7 − Run the project.
- Related Articles
- How to create CollectionView Layout in an iOS App?
- How to create Tab Layout in an Android App using Kotlin?
- How to Create a Tab Layout in Android App?
- How to create a gridView layout in an Android app?
- How to create GridView Layout in an Android App using Kotlin?
- How to create a WebView in an iOS App using Swift?
- How to create transparent Status Bar and Navigation Bar in iOS?
- How to create scrollable TextView on iOS App?
- How to hide the status bar in a iOS App using Swift?
- Create circular Progress Bar in iOS
- How to create multiple styles inside a TextView on iOS App?
- How do I programmatically “restart” an iOS app?
- How much does it cost to make an iOS app?
- How to create a Custom Dialog box on iOS App using Swift?
- How to make an HTTP request on iOS App using Swift?
