Wednesday 1 May 2013

UITabBarController (Multiple MVCs)


Its a very common controller, It allows user to navigate between different views selecting different tabs.

The tabBarController's view is any number of viewController, simply control drag from the tabBarController to each of the viewControllers that represent the tabs.

By control dragging you are setting up following property in UITabBarController:

@property (nonatomic, strong) NSArray *viewControllers;


Tabs have icon and title which easily can be set on xcode. You can also add a badge on tab icons by the following line of code:

- (void) somethingHappendToCauseUsToNeedShowBadgeValue
{
   self.tabBarItem.badgeValue = @"Something";

}


written by: infinitywebseo 

No comments:

Post a Comment