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 calendartable开发者_C百科view . how to add Tabbar and tabitem to CalendarTableview. help me .
here is my picture.
Thanks.UINavigationController has a built-in navigation-toolbar. Check the section in appples developer documentation, that should help if I understand your problem right.
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]];
精彩评论