Remove TabBarItem highlight - iphone

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.

Related

How to add subview to UIViewController pushing UINavigationBar behind

What I want is as follows:
Basically I have a view controller with navigation bar. There is a menu button as left UINavigationBarItem. On click of menu button list of menu items will animate from top. This is achieved using 'addSubview' method. But menu list is added as subview below navigation bar. I want to add menu list view pushing navigation bar behind menu list view. I dont want to hide navigation bar.
Thanks
try:**[self.navigationController.view** addSubview:xxxView],this work to my app. Don't use [self.view addSubview:xxxView], that can't put the navigation bar behind.
Have you tried..? bringing your subview to front after adding the subview
//after adding your menu view
[self.view bringSubViewToFront:menuItemsView];
[self.view sendSubviewToBack:self.navigationController.navigationBar ];
I am not Sure but........ It may be not possible, because if You want to display your menu list behind your UINavigationBar then you need to hide your UINavigationBar without hidden UINavigationBar menu list will always display below the UINavigationBar.

how to add a uitab bar controller with non of the tab get selected?

I have added an UITabBarController. My requirement is to display a view with tab bar controller. but that view is not part of the tab bar items. For example my tab bar contains 3 tabs
contacts
camera
history
Generally if we add tabbar controller contacts will be get selected and that view will be displayed automatically. but i don't want in that way...
i used [tabBarcontroller setSelectedViewController=nil];
i am able to get a tab bat with non of the tab get selected. but when i am trying to select a tab item it's not working.. I think i set the selectedViewController to nil. is there any other way to achieve my requirements...?
please explain your answer clearly.. i am new to iphone app development..
Present a view controller which is not a part of your tab bar controller and put a tab bar image/buttons at the bottom of it which resembles your tab bar. When you receive a button pressed message from within that view controller, show that tab on screen.

UITabbar with none item selected

Any one know how to create an app in such a way that when the application loads the uitabbr items are not selected(highlighted)..
need to display a view in window on load..no need to display tabbar item contents until click on tabbar button item..?
please help me..
You can present a modal view controller which hides the tab bar at startup. I think that's the best you can do with tab bar rules.

Overlaying views & positioning

I have a tab bar view, and another UIView which contains a button, which needs to be visible just above the tab bar.
I have added another view which always sits above the current select tab's view, but can't figure out how to make it sit just above the tab bar Screenshot http://img.skitch.com/20090524-jq6ufyiwp6c2uu1x5tkrrsd97m.jpg
I would suggest sub-classing the tabbar to include the new view. That way you do not have to worry about a tab overlaying the view. All your resizing should be done automatically and you will never accidentally hide a component.
You can also have the controller also look after the button and view that you add. you would just need to replace the tabbar in the tabbarviewcontroller to be your one.
Add your view with button in the tab bar view and use either one of these
– bringSubviewToFront:
– insertSubview:aboveSubview:
to put it above all and check how many pixels you need to position your button so that it does not get above the tabs.
You could also add it at the window level.

How to switch to a different UITabBarItem on UIButton touch up inside

I have a UITabBarController as my MainWindow.xib. I have 3 tab bar items on the tab bar. On the second tab bar item, i have placed a UIButton. When the user taps the button, i want to be able to switch to the first tab bar item and display the view loaded there. How would i do this programmatically?
Thanks
You can use UITabBacController's selectedViewController property if you have a reference to the view controller you want to switch to, or you can use selectedIndex if your tabs have a static order and you know which index to switch to.