Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

amalshah71

macrumors member
Original poster
Feb 1, 2009
51
0
Hello,
I have a app with lot of UIViews...and i controll the views using a common tabbar....depending on views i change the tabbar icons....


The thing is that when i select a icon on tab bar...the blue background remains as it is when i move to the next view....

How do i make my icons look the same as in when they were not selected...


Thanks
amal
 

amalshah71

macrumors member
Original poster
Feb 1, 2009
51
0
screen shot is as attached.....
 

Attachments

  • Picture-21111.png
    Picture-21111.png
    10.9 KB · Views: 75

blackmesa

macrumors newbie
Mar 30, 2009
27
0
While playing with the tab bar I saw that a mask it automatically applied to the buttons. Try playing with the alpha in the icon you are trying to put as background on the tab bar button.
 

amalshah71

macrumors member
Original poster
Feb 1, 2009
51
0
I believe that alpha thing comes into picture when trying to display the tab bar icon.....thats not my case....

i want the blue background to go away when i am done with selecting the item....

what's the way out...


amal
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
First, I wanna know how you are managing to get more than one item from the tabBar selected at a time. Normally, they operate similar to radio buttons in that selecting one deselects any others. Care to explain how you defined the tabBar either in IB or the code?
 

amalshah71

macrumors member
Original poster
Feb 1, 2009
51
0
I included tab bar in my window from IB....and with whatever the current views that are being currently displayed..i do a

array=[[NSArray alloc] initWithObjects:leftArrow,summary,home,differentViews,nil];
[tabBar setItems:array];
[array release];

amal
 

amalshah71

macrumors member
Original poster
Feb 1, 2009
51
0
guys....am really stuck at this point....i don't see anything wrong in what i am doing...googled a lot but not fruitful yet.....any alternative to remove those background colors....

amal
 

MacDonaldsd

macrumors 65816
Sep 8, 2005
1,005
0
London , UK
guys....am really stuck at this point....i don't see anything wrong in what i am doing...googled a lot but not fruitful yet.....any alternative to remove those background colors....

amal

A tab bar takes an array of UIViewControllers, which I assume is what you are doing. Once you have initialised the tabbar you shouldn't need to change its contents at all, and like others have said the TabBar deals with the blue background not you.
 

amalshah71

macrumors member
Original poster
Feb 1, 2009
51
0
A tab bar takes an array of UIViewControllers, which I assume is what you are doing. Once you have initialised the tabbar you shouldn't need to change its contents at all, and like others have said the TabBar deals with the blue background not you.

My app navigates through various views through help of Tab Bar and on display of different views a different set of Tab Bar icons is shown on tab bar. So basically i have to change the contents of tab bar , since different views in my app use the same TabBar.

As said "TabBar deals with the blue background not you"...so is there anyway to get rid of that blue background once the event w.r.t. tab bar icon is over....

amal
 

Niiro13

macrumors 68000
Feb 12, 2008
1,719
0
Illinois
I think the TabBar is getting confused, because TabBars are supposed to be used for separate pages (just like tabs in a web browser). If you're using the items as buttons, then you should use a UIToolbar. This way, the controls are actual buttons and not tabs.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.