Adding tabbar controller to uiview - iphone

I have a requirement with below steps,
1. Login page
2. Page2
3. Page 3 - table view
Now I want to display a tab barcontroller with 4 tab items on page 3. All the 4 tab items have individual view controller. Page 3 is not one of the items of tab controller, it just contains the tabcontroller so that the user can access 4 other functionalities that the app provides. I do not want to display it on the login page and page 2 so adding the tabcontroller to MainWindow is not a possibility. Can anybody please help me out with adding a tabbar controller to a uiview having uitableview.

You may find this question useful: Tab bar controller inside a navigation controller, or sharing a navigation root view
Alternatively, after Page2 you could swap out the entire root view controller from your window and replace it with a UITabBarController's view. Since this won't be part of a navigation stack, you'll have to manually swap the views.

Related

Perform Button Segue to Table View Controller within Navigation Controller

I have a main screen that is a Tab Bar controller with 4 tabs. One of the tabs takes you to a navigation controller where you can click through 3 different Table View Controllers.
I also have a button on one of the other tabs. I would like this button to take the user to the end of one of the Navigation controllers.
I can perform the segue just fine, but when I use the button to get to the View Controller, the tabs on the bottom aren't there, it's just a table.
Is there any way I can segue to a View Controller within a Navigation controller from outside the navigation controller and still have the tab bar showing?
Here are some pictures of what I mean:
See how at the bottom of this page there is the tab bar still? This is when you get there from the navigation controller
And in this picture, there is none (This is the friends page, same as picture above). I arrive at this by using a segue from a button from one of the other tabs.
Please let me know if I need to be more descriptive but I can't figure out how I can make this happen. Thanks for the help!

UIViewController in a UITabBarController without tab bar item

So I have this application where I have a view controller (which I want to appear first when the app starts) and a tab bar controller. I also have other navigation bar controllers that are in the tab bar controller. I want to place my view controller on top of the tab bar controller. Making the tab bar controller the parent of the view controller would be better though.
But take note, I do not want a tab bar item to represent the view controller and I want the tab bar to appear along with the view controller. I do not and would not want to use storyboards as much as possible. How can i achieve this?
I guess the simplest solution would be to use a screenshot of your tabBar and put it in your HomeViewController as a button. In this case you could use your HomeViewController as rootViewController and in the button action you set the TabBarController as the rootViewController.
Root = Home + Button
-->
Root = TabBar
Perhaps you need four buttons, if you want the correct tab to be selected.

Dismiss view controller, go to tab-bar view

I have 4 pages on startup. They are all view controllers. I also have a tab-bar controller with 4 views/tabbar-items. I want a button on the 4 view controller pages that links to the correct tab-bar view. For example, if I am on the third view controller, I want to get to the third view in the tab-bar.
I've tried to use the
[((UITabBarController *)(self.parentViewController))setSelectedIndex:index];
method. But it doesn't work.
Any suggestions?

How to add tabbar items dynamically ipad

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?

Problem in adding more than 5 button in tab bar controller in iphone

Hello everybody i need your help.
I am making a tab bar based application in iphone. i have more than 5 button to show in tab bar. when i did it, five button displayed fifth button is more..... but when i clicked on more then more button came in a table view not in tab bar.
That's how it works. From the documentation (http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/TabBarControllers/TabBarControllers.html%23//apple_ref/doc/uid/TP40007457-CH102-SW2):
If you add more than five items to the
viewControllers property, the tab bar
controller automatically inserts a
special view controller (called the
More view controller) to handle the
display of the additional items. The
More view controller provides a custom
interface that lists the additional
view controllers in a table, which can
expand to accommodate any number of
view controllers. The More view
controller cannot be customized or
selected and does not appear in any of
the view controller lists managed by
the tab bar controller. For the most
part, it appears automatically when it
is needed and is separate from your
custom content. You can get a
reference to it though by accessing
the moreNavigationController property
of UITabBarController.
That is intended behavior and not an issue, if you read the viewController Programming guide you could have seen that right away: http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007457