how to create six items tabbar without third party library in swift? - swift

How to create six items tabbar like FaceBook without third party library? I have try to use third party library, but it can't do the effect I want. Is it any information I can study to make a six items tabbar?
Thank you.

It is not possible if you have more than 4 tab bars then More button is displayed, from Apple documentation:
You can also use the delegate to monitor changes to the tab bar that are made by the More navigation controller, which is described in more detail in The More Navigation Controller.
The More Navigation Controller
The tab bar has limited space for displaying your custom items. If you add six or more custom view controllers to a tab bar controller, the tab bar controller displays only the first four items plus the standard More item on the tab bar. Tapping the More item brings up a standard interface for selecting the remaining items.
More on:
https://developer.apple.com/documentation/uikit/uitabbarcontroller
https://developer.apple.com/documentation/uikit/uitabbarcontroller?language=objc#1653016

Related

What is the maximum number of view controllers that can be part of a UITabBarController?

Please answer this question.
I know that it is pretty trivial, but I do not possess sufficient knowledge to be able to answer it myself, that is why I am asking the readers of this question.
The maximum amount of Tabs before a "more" button appears is 4, but you can essentially have as many as you want as long you have enough memory.
From the documentation
The tab bar has limited space for displaying your custom items. If you add six or more custom view controllers to a tab bar controller, the tab bar controller displays only the first four items plus the standard More item on the tab bar. Tapping the More item brings up a standard interface for selecting the remaining items.
You can change the maximum number of tabBar items before to show tap more it is possible using KVC
[self.tabBar setValue:#(numberOfMaxToShowTabMore) forKey:#"customMaxItems"];
And this code you must insert before add controllers in tabBar

Is there a way to implement four tabbed uitableviews that all have the same uinavigationbar

I am working on a mobile version for my company's web app. The structure of this application requires uitableviews with a tab bar on the bottom and a navigation bar up top to return to the previous view. As you drill down in the application the tab bar items change at each level allowing selection of different views pertaining to that specific level in the app. I need a way to implement this with a navigation bar on top that navigates back to the previous screen on every tab in said tab bar when a back button is clicked on any of the tabs.
for example: let's say i start out with an items tab and a simple about tab. When i click items it drills down to a new view called subitems and the tabs for this view are subitems, favorites, details, and notes. I want the navigation bar to go back to the previous screen when i click the back button on any one of these four tabs.
Is this at all possible? I can't seem to find anything related to this type of structuring within an app. any help/examples would be greatly appreciated.
I know that a negative answer always sounds bad, but I tried to do the same a few months ago and I could not find a way of doing it using the standard UITabBarController/UITabBar. Take also a look at this question/answer.
The good news is that it is not that difficult to implement from scratch a tab bar controller that can be pushed on a navigation stack. There are also several examples around, one is BCTabBarController. GtabBar is another example.
I actually found a way to do it you just have to implement the navigation bar's leftbarbuttonitem instead of the traditional back button. Then I just created a method that is invoked when the back button is pushed this updates the navigation stacks of all four views within the tab bar and sets the tab bar items accordingly to match with the previous views we are navigating back to. . . so long story short...it is possible.

uitabbarcontroller

I wrote an app that uses UITabBarController, but if I add a lot of tabs it don't show me more button. Doesn't the UITabBarController creates this button automatically?
No - according to the documentation, you should not need to handle this yourself.
The tab bar has limited space for
displaying your custom items. If you add six or more custom view
controllers to a tab bar controller, the tab bar controller displays
only the first four items plus the standard More item on the tab bar.
Tapping the More item brings up a standard interface for selecting the
remaining items.
Yes, you need to create it manually. The "fifth tab is more" is just a convention. It's up to you to create a UIView/UIViewController pair to manage your additional settings and map them to that fifth tab.

How to hide tab of the tabBarController?

I want to create a Tab in the TabBarController but i don't want to show that on the tabBar...i mean it should be there but invisible...
like I have 5 tabs in my tabBarController and I want that my fifth Tab only is invisible...
is this possible??
There's no way to hide an individual tab. You could give it a blank icon, I suppose, but you'd still see the space where the tab is. If you had more than 5 tabs, you could arrange for this invisible tab to be on the More... tab item, so it wouldn't be immediately visible but the user could access it.
If you don't want the user to be able to access it, one has to wonder why you want to include it in the tab bar controller in the first place. Rememeber: when you find yourself fighting against the framework like this, there's usually a much better way to do what you're trying to do.
Not really—the tab-bar controller is pretty specifically implemented so that any view controller it manages can be accessed from the tab-bar UI somehow, be it on the bar itself or in the “More” section. What are you trying to accomplish?

UITabBarController with more than six icons

i'm developing an iPhone application and i'm implementing the navigation among views with the UITabBarController.
The documentation says :
"The tab bar has limited space for
displaying your custom items. If you
add six or more custom view
controllers to a tab bar controller,
the tab bar controller displays only
the first four items plus the standard
More item on the tab bar. Tapping the
More item brings up a standard
interface for selecting the remaining
items. The interface for the standard
More item includes an Edit button that
allows the user to reconfigure the tab
bar. By default, the user is allowed
to rearrange all items on the tab bar.
If you do not want the user to modify
some items, though, you can remove the
appropriate view controllers from the
array in the
customizableViewControllers property."
Is there a way i can force the control to use exactly six icons without adding the "More ..." one?
You could subclass the object, and override its drawing properties, but it would most likely be rejected by Apple, as it is an inconsistant UI, and would go against the holy HIGs.
No, the tab bar will only accommodate up to five items. Once you add more than that you get four plus the more button showing.