iphone - How to hide the UITabBar selection indicator for ios 4.3 not for 5+? -


how hide uitabbar selection indicator ios 4.3 not 5+

i need hide selection indicator of uitabbar controler in ios 4.3.

try code:

// ios 5.0+ [self.tabbar setselectionindicatorimage:[[[uiimage alloc] init]autorelease]];   // earlier versions  - (void)tabbarcontroller:(uitabbarcontroller *)tabbarcontroller didselectviewcontroller:(uiviewcontroller *)viewcontroller {     [self customizetabbar]; }  - (void)customizetabbar {     nsstring *imagename = [nsstring stringwithformat:@"tabbackground%i.png", tabbarctrl.selectedindex + 1];      for(uiview *view in tabbarctrl.tabbar.subviews) {            if([view iskindofclass:[uiimageview class]]) {                 [view removefromsuperview];            }       }       uiimageview *background = [[[uiimageview alloc] initwithimage:[uiimage imagenamed:imagename]] autorelease];     [tabbarctrl.tabbar insertsubview:background atindex:0];      [tabbarctrl.tabbar bringsubviewtofront:background];     //if needed, here must adding uilabels titles, didn't need it. }  

hope helps! :)


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -