Making a UITabController the tab of another UITabController - ios

Is it possible to have one UITabController be a tab of another UITabBarController? For example, I have a UITabController with 6 tabs, can I make the the sixth tab lead to a UITabBarController with two tabs?

You mean the 5th tab, since if you try to put 6 tabs in a UITTabBarController, you will wind up with a "More" selection, and then those tabs showing up in the tableview.
I imagine this could be done using either Storyboards with Container Views, or using parent/child view controllers in code. The question is: why would you? You'd then have a tab bar on top of another tab bar. You're pretty much guaranteed rejection by Apple because I don't believe this is allowed by the HIG.
If you need more than 5 buttons worth of tabs, either implement a custom solution, or change your UI/UX to something like a split view controller with master/detail lists - something more scalable of an interface.

Related

Dual TabBars in StoryBoard IOS

I've seen that there isn't any possibility of adding a custom tab bar in TabBarController in StoryBoard of IOS. However a single tabBar can contains multiple buttons. But I want to design two tab bars (first one on top and second one on bottom of storyboard) and the content I want to see in the middle of both tabBars. How can I design my custom tabBars using storyboard?
I'm currently designed in xib but I want to get rid of the xib and have to design an autolayout tab bars on storyboard and to avoid remove sub views again and again when each button is called.
Is it possible to design dual tabbars in storyboard?
You can't have 2 tab bar controllers at the same time. The tab bar controller won't allow it, and Apple would very likely reject your app if you created that look yourself. It sounds like a really bad user interface, frankly.
That said, if you want to create an UI with a normal tab bar on the bottom of the window and another thing that looks and acts like a tab bar at the top, you could create a custom parent view controller class and implement your "top tab bar" look yourself, then use that custom view controller as one of the tabs in your tab bar controller. However, I'd bet money that Apple would reject such a thing as a violation of the HIG (Human Interface Guidelines).

What approach should i use when making tab bar application

I'm started to work at new place as iOS programmer. I joined existing project and got an assignment that i don't really know how to approach.
So my problem is this: when you press a button, next window has to have a tab bar with four icons, this means four different navigation stacks. Its not that hard to make, but in main screen i have more then four icons, and if i press any one of them next window always has to have a tab bar with four static icons, like shortcuts or something.
So what should I do? Does anyone had the same situation? I want to start with a good advice to save trouble later on.
You should probably rethink the app design. Tapping an item on the tab bar shouldn't result in a different number of tab bar items, as it leads to an unstable and unpredictable UI.
While not the most efficient in terms of visible content, you could introduce a segmented control (or a similar custom view) on top right under the navigation bar (if there is one), as seen in the Facebook app (though here it is used to perform actions, not changing views).
Your root view controller should be embedded in a navigation controller. Then push a view controller which contains any number of tab bar items not TabBarController. Then you can present each view controller either push or custom.

Single navigation bar in iOS tabbed app

I'm doing iPhone tabbed application, but I need to use navigation bar also (just for app title and single icon for Settings in the corner) like twitter did: link. I have 4 tabs in my app too. I was wondering is there any chance to create only one navigation bar, so when I want to change it, I will change it only in one place?
I was looking at this tutorial, but there are two "Navigation Bar" objects. And I would like to have single object that will appear in every tab.
Right now I created tabbed app and manually added navigation bar item into first tab. Then I copied it into others. It works ofc, but I'm not sure about that solution:/
Your use of separate navigation controllers for each tab isn't a bad solution.
Setting up the navigation bar and its items in only one place is also a good idea. To achieve this, you could always have your view controllers derive from a custom view controller that overrides navigationItem.

ios: storyboard + tabbar + more button (design)

I have a little app that shows a list of dvds, then you can drill down from the table view and get some details. It also has a tab bar at the bottom and you can switch from dvds to bluray as tab buttons. This all works fine.
In reading about tab bar apps, I saw a demo that once you added more than 5 tab bar buttons, "more" would show up and then you can drag-n-drop the buttons like in Apple's Music app, which is cool! I also noticed that each tab bar button controlled a separate navigation controller, which was a new technique to me.
When I created my app, it had a single navigation controller and I added a view controller with the top of the view being a table view and the bottom of the view a tab bar. I then drag buttons to the button bar and can add more than 5 buttons and "more" doesn't show up.
So, I figure, it needs to to be a different navigation controller design.
I am confused on if I can take my app and embed a tab view controller or if I can adapt what I have or not.
Right now, since all tabs are basically the same (a table that drills down to a detail view) I just reload the data from a different file when the tab is switched. Nice and clean.
If I switched to the tab view controller concept, it seems wasteful to create 5 navigation controllers with 5 table views that drill down to 5 detail views. Plus what if I wanted 7? or 9? (I do realize (or guess) that I can give each 5 views the same class name, but still the UI has lots of storyboards…)
This is a design question to better understand what my options are.
Tab bar controller must always be the root controller of an application. (Unless it's in a split view, in which case the different sides of the split can be a tab bar controller - but it still has to be the root.)
So, the correct design for your app is: tab bar controller as root, each tab containing a navigation controller, each navigation controller having your table view controller as the first view controller. It may seem wasteful but if you think about it, each tab really needs to have its own stack of controllers, so there's no other reasonable way to do it. If user on tab 1 is 2 deep in a nav stack but tab 2 is 7 deep you don't want to switch between tabs and lose your place.

"Slide" segue between UITabBar views

My iOS 5 app uses storyboarding with a UITabBarController. There are three "tabs" each displaying a view controller which has been linked using a relationship back to the UITabBarController. At the moment each view controller appears when you tap the relevant tab, as expected. However, for a more gracious transition I would like to slide the view controllers on and off screen.
By way of example, if I am currently on Tab 0 and then select Tab 1 the view controller on screen (for Tab 0) should slide off to the left-hand side of the screen, and the new view controller (for Tab 1) should slide on from the right-hand side of the screen.
I have been able to achieve this behaviour using a custom UIView as the tab bar but would like to know whether this is possible with a custom segue in storyboarding, as that would certainly save a lot of coding (and also would keep things a fair bit neater in the project)?
Thanks in advance for any assistance.
I am trying to do the same thing.
Unfortunately I think the relationship segue does not allow any customization as it just connect tab bar and the tab bar items together, and not a transition.
My guess is we have to do the transition ourselves when the view appeared.

Resources