May 26, 2013

TabBar Quick Start

This tutorial shows how fast to set Tab Bars in your project, and add third view to your tabbed application.
 About Tab Bars: For many applications, an even easier and more user-friendly approach will be implementing a tab bar (UITabBar) and tab bar controller(UITabBarController).Tab bars, like toolbars, present a rage of touchable choices on the bottom of the display but always use icons in their presentations.Tab bars are also dedicated to switching between multiple views in an application, making them the obvious choice for application that offer more features than can fit on a single iPhone screen.

1.Setting Up Your Project
Go to Xcode->File->New->Project. Choose "Tabbed application" in the window.Click next, set appropriate names to your projects.



2. After you finished setting your project, you will have window with 2View Controllers with tab bars.


3. Add new View Controller to your storyboard from object panel


4. Add .h,.m files for the third view controller. Go to File->New->File->Cocoa Toach->Objective-C class. Name your class as you wish.

5. Go to Storyboard, select the third view controller and write class name of the third view controller in class field


6.Drag Tab Icon from object panel to the third controller.


7.Drag from main controller to third one, and select view controllers.
8. Now you should have all three view controllers connected to the Tab Bar Controller.







No comments:

Post a Comment