Tabs under UITabBarController's More button have 2 navigation bars - iphone

I have 6 view controllers on a UITabBarController. Each of them has a UINavigationBar at the top of them (Not linked to a UINavigationController), for showing the title of that view controller, and some buttons for controlling it. This was fine while I had 5 controllers, as no 'More' button would appear, but when I add a 6th, the more button appears. The tabs under that end up having two UINavigationBars! One is the one I added, with my title, the other is created by the TabBar and has a 'Back' arrow to go back to the more page. How can I fix this, either by merging them or otherwise?
Thanks, if you want screenshots just ask.
Here's a screenshot
The brown one is a UINavigationBar subclass I made, and added to the view in IB. The other one was added by the Tab Bar controller.

Yes you will need to merge them.As you need more tabs so More controller will apear and once you navigate in, it will put back button(more). In order to solve this and maintain your brown navigationBar you will need to use navigationController for those tabs in more(only for extras, not for all). This will put more(the back button) on your navigationBar.
But Remember In more you will have edit option also using which user can change position of tabs. So in that case this problem may reappear for other controllers. So please check if you can disable the editing of tabs(rearrangement). If not then you should think the same for other controllers also(in other tabs)
Thanks,

Ok, Followed all of your tips but no luck, until: I tested this https://stackoverflow.com/a/3397506/468868
Basically, you are right #Ravin, we must wrap the items in NavigationControllers, but after that, you must specify that:
- (void)viewDidLoad
{
self.navigationController.navigationBarHidden = YES;
}
Now, I just need to figure it out how to remove the navigationController from the "More" view

Related

How i implemented an Tab into UITabBar without seeing this tab as item?

I have an UITabBarController which has 5 Tabs. So, my problem is, i want to make an welcome screen into the UITabBarController, but this screen should be just only one time visible, when the app started. After the screen appears and the user switch the Tabs, he can't go back to the welcome screen, otherwise he must quit the app and open it again.
I tried to make an UIViewController as an RootViewController, but he dont show me the UITabBarController instead.
Is there any way that i can solve this problem over the storyboard? Also with code it will be also okay.
If I did not misunderstand your question these ideas will help you;
Add an extra tab to your tabBarViewController , make it welcome view and make this view controller initial VC so user when landing to tabBarViewController this view will appear after few seconds change tab index selectedIndex as you desire from UITabBarViewController then hide welcome view button from tabBar.
Seond way : Inside UItabbarViewController create custom tabbarView (scrollable) you can use collectionView it's easy to implement and it cells selectable like buttons. Hide original tabbar make welcome view appears first, make its index sixth then change selectedIndex programmatically when you need and disable scrolling from collectionView with this way only your five buttons appears on screen and welcome view button automatically remain out of screen.
You can find example code in my Github repo UICWaveTabBar, UICSlideTabBar , UICExapandableTabBar
Fist link including .xib file, you can edit it from storyboard, second and third only code

In which method should I set my UIToolBar hidden

I have been coding in iphone platform for about a few months. One thing I am still to understand is in which method exactly should I set the navigation bar/toolbar/barButtonItem hidden.
In my project sometimes I set in - (void)viewDidLoad, sometimes I set in - (void)viewWillAppear:(BOOL)animated. Sometimes I set it from where I push the navigation controller.
I think I am not understanding the basics correctly. If one way is not working, I try the other way and somehow it works.
If I am to hide the toolbar or barbuttonitem in navigation controller, where exactly should I set that.
Edit:
If I am pushing a new navigation controller, in which I want my toolbar hidden, where should I set it hidden. Similarly, when I pop it, I want the the toolbar to be shown, where should I set the toolbarHidden property to 'NO'.
Similarly, I have a navigation controller, sometimes it needs to show the toolbar and sometimes it needn't, where should I check the condition for this case.?
You should set this property before the pushing the view Controller and don't need to set No at pop. E.g see the following link:
hiding tabbar on table view cell click

Starting an app with a Tab View and no tabs selected?

I'm developing an iPhone app with Objective-C and iOS SDK with a tab view on the bottom. I want to make the app so that when it first loads up, the tabs are on the bottom, but none of them are selected. Instead, the user is presented with a "home" view, and can select the tabs from there if he / she desires.
How would I make this work? I'm assuming it's something in the App Delegate?
Thanks!
I did this recently. Just do
[self.myTabBar setSelectedItem:nil];
Works perfectly, no tabs should be selected. Let me know if you have any problems. Also, just put that in either - (void) viewDidLoad or initWithNibName .
I think this would be something that's appropriate to fake.
I would:
Add a subview that overlays the area normally occupied by the selected tab view.
Add UITabBarControllerDelegate tabBarController:shouldSelectViewController that will hide/remove that view.
The only remaining problem is to make the actually selected tab button seem unselected until the subview is hidden.

Current UIView Questions iPhone SDK

I posted earlier but am running into similar problems again. Basically the way that my app is setup there is a top bar that is basically just a static image that has UIButtons placed on top of it. That is the Main View Controller and is persistent no matter what view is shown beneath it. I can't use a navigation controller because it is not possible to change the height and I need the bar to be significantly larger than a navbar. However my bar is functioning in much the same way. There is a "Home" Button, a "Back" Button and several destination buttons.
I understand how to switch views from say the home screen. My confusion comes with the back button. In order to press back the app is going to need to know what view is currently being displayed so that it can be removed from view and a new subview can be added. Ideally I would use the UINavigationController so that I can push and pop views which is really what I want to do here, however that is not possible because of the visual problem.
Does anybody know of a method that returns the current displayed view so I could do something like the following
[currentview.view removeFromSuperView];
[self.view insertSubview:experienceViewController.view atIndex:0]
You can use UINavigationController with the nav bar hidden. Put the nav controller inside a view that does have your jumbo toolbar and you'll have access to the push/pop behavior you're looking for.

How to present a modal view controller with fixed UIToolbar?

I am trying to set up a Modal View Controller, that that lies below a fixed toolbar. therefore the toolbar is supposed to stay on top while the modal view rolls in.
the Safari-App does that for example, when hitting the bookmarks-button. the toolbar stays, the buttons change..
I tried a couple of things like pushing the toolbar to the front and ended up not using the presentModalViewController method at all, and animating the new View manually into a subview instead. but that brought a couple of other issues along.
I'm not sure what you are saying, when you press add bookmark in safari, a new modal view shows with no tool bar. The navigation bar at the top is not a tool bar if that is what you mean. They are UIToolbarItem set into self.navigationItem.
All modal views I've seen are animated until they take up the whole of the screen. Those modal-like views that only scroll up to a certain point in some apps, are done by hand. Maybe you can cover those issues encountered when doing this by hand in another post?