Tab bar for Xcode Swift for iOS
92 12 31965
A simple walkover on how to add more tabs to an iOS project using Xcode and Swift. Made this video to show a few people who keep trying to say Xcode and Swift are hard, that it is really not that hard at all. Anyone can do this. This video part of my blog Interpreted Keystrokes. http://intkeystrokes.blogspot.com/ Thanks for watching.
By anonymous 2017-09-20
This is kind of an old question. I tried a few of the other answers here but couldn't get it to work. Sometimes it is just easier to watch someone do it in action. Here is the video I watched that taught me how to do it:
I will summarize the process below.
Create a new Tabbed Application project
This will automatically provide two tabs that already "just work".
Add new View Controller
Drag another view controller onto the storyboard.
Add Tab Bar Item
Drag a Tab Bar Item onto the new View Controller that you just added.
Connect to Tab View Controller
Click and Control-Drag from the Tab View Controller to your new View Controller. A menu will pop up. Choose the view controllers option under the Relationship Segue group.
That's it. You should be able to run it now and have all three tabs work. Watch the video that I linked to for more details.
- To do anything on your new tab, don't forget to add a new View Controller class (as you would for any new View Controller).