Wednesday, 5 September 2012

For the customizing the Tabbar image

http://ios-blog.co.uk/articles/tutorials/how-to-customize-the-tab-bar-using-ios-5-appearance-api/
 UIImage* tabBarBackground = [UIImage imageNamed:@"bottom_bar_bg.png"];
    [[UITabBar appearance] setBackgroundImage:tabBarBackground];
   
    //[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"selection-tab.png"]];
   
  
    UITabBarItem *filterTab = [self.tabBarController.tabBar.items objectAtIndex:0];
    [filterTab setFinishedSelectedImage:[UIImage imageNamed:@"fav_icon_selected"] withFinishedUnselectedImage:[UIImage imageNamed:@"fav_icon"]];
   
    filterTab = [self.tabBarController.tabBar.items objectAtIndex:1];
    [filterTab setFinishedSelectedImage:[UIImage imageNamed:@"exp_icon_selected"] withFinishedUnselectedImage:[UIImage imageNamed:@"exp_icon"]];
   
    filterTab = [self.tabBarController.tabBar.items objectAtIndex:2];
    [filterTab setFinishedSelectedImage:[UIImage imageNamed:@"user_icon_selected"] withFinishedUnselectedImage:[UIImage imageNamed:@"user_icon"]];

No comments:

Post a Comment