Can I add more than 8 tabs on UITabBarController?
My code is here:
UITabbarController *tabbar=[[UITabbarController alloc]init];
tabbar addTabItems......
You can add as many view controllers to UITabBarController as you want. The right most tab button will be called More with three dots which will take you to the screen where you can edit which view controllers to show and which ones to hide.
Yes you can add 8 tabbars but only 5 will be visible and for remaining, it'll show you a dotted tab on clicking that tab it'll show the list of remaining tabs in your tabbar.
Related
I have a tabBar Controller with 2 tabs: firstVC, secondVC. And when tabBarController appears i want to see on the screen this tabBar controller with 2 tabs and active controller(called main) not from this tabs. Is it possible?
Yes.
You can embed those 2 tabs in navigationControllers. Each of the 2 tabs will have its own stack of viewControllers.
Take a look at this answer for a detailed description.
I have a UITabBar based application, on one TabBar Button I have a navigation controller. When I move to navigation controller, tab bar highlight option needs to be removed. No tab bar buttons should be selected.
How could I make this possible?
Try to take a look at the "Managing the Finished and Selected Image" task's section of the UITabBarItem docs.
If you want to change tabBar index then use
[self.tabBarController setSelectedIndex:index];
of if you dont want to show selected index then just hide tabBar.
I am developing an application for iPad as a splitview template based with uitabbarcontroller in my application. I have 10 tabbar items and the first time, I only want to show 4 tabbar items. After I navigate another view I want to remove the 4 original tabbar items and add new 4 tabbar items with new viewcontroller . How is this possible?
You should not modify the previous tab bar - you should set the previous tab bar to hidden. There's a post already on how to do this here.
Then, add a new tab bar controller into the new View Controller that is contained inside of the original tab bar controller's view controller array.
Although it is possible, I wouldn't recommend this, as it isn't really good UI practice. Have you explored any alternatives?
I'm beginner in Iphone development. I have an app in which there is a tool bar ,when I click the tool Bar buttonI need to display modally a Tabviewcontroller with 3 tabs and navigation bar. Is it possible to do this? May be it is simple,but i'm a beginner. How it can done?
Any help would be appreciable.
What is the issue that you are facing? Overall this is what you need to do:
Create a UITabBarController with 3 items. (There are resources everywhere where you can figure how to do this)
Handle what you do with the 3 views/tab items. Your navigation bar logic goes there. You set up the navigation bar for the 3 different views from the 3 tabs.
Present it as a modal view using:
[self presentModalViewController:yourTabBarController animated:YES];
My application consists out of a tabbarcontroller and inside i got multiple navigationControllers. Now i want to hide the bottom bar of the tabbarcontroller from the start because the buttons on the bottom bar lead to features inside the application which are just not ready yet so i dont't want the user to see them. How do i do this?
Thanks in advance!
A couple of options:
Set hidesBottomBarWhenPushed=YES on one of the controllers in your navigation controller. I'm not sure if this works on the root view controller of a navigation controller.
Hide the tab bar items by changing UITabBarController.viewControllers. I'm not sure if it lets you have a tab bar with only one tab, but it ought to.
Set the tab bar controller's delegate (see UITabBarControllerDelegate). In – tabBarController:shouldSelectViewController:, return NO if it hasn't been implemented yet.