SOF
SOF

Reputation: 457

how to add tabbar to uitableview

My app is Navigation base application.In this application , UIViewController has button event . Tap on Button firing to (pushViewController) CalendarTableview. Now i need to add Tabbar and tabitem to calendartableview . how to add Tabbar and tabitem to CalendarTableview. help me .

here is my picture.alt text Thanks.

Upvotes: 1

Views: 3301

Answers (2)

Axel
Axel

Reputation: 1754

UINavigationController has a built-in navigation-toolbar. Check the section in appples developer documentation, that should help if I understand your problem right. views

Upvotes: 2

Di Wu
Di Wu

Reputation: 6448

In your calendartableview_controller's viewDidLoad() method, try to create a tab bar programmatically, and then add it as a subview to the view of your calendartableview_controller:

   //create a tab bar controller in your calendartableview_controller
   UITabBarController *tabBarController = [[UITabBarController alloc] init];
   tabBarController.title = @"My Tab Bar";

   //assign child controllers to the tab bar controller
   tabBarController.viewControllers = [NSArray arrayWithObjects:firstViewController, secondViewController, thirdViewController, nil];

   //add it to your calendartableview_controller's view as a subview
   [self.view addSubview:[tabBarController view]];

Upvotes: 1

Related Questions