开发者

how to add tabbar to uitableview

开发者 https://www.devze.com 2023-02-03 08:36 出处:网络
My app isNavigation 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 cal

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.

how to add tabbar to uitableview

Thanks.


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

how to add tabbar to uitableview


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]];
0

精彩评论

暂无评论...
验证码 换一张
取 消