自定义UITabBar

1   UIImage *tabBackground = [[UIImage imageNamed:@"tab_bg"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
2   [[UITabBar appearance] setBackgroundImage:tabBackground];  // 设置UITabBar背景图片
3     
4   [[UITabBar appearance] setSelectionIndicatorImage:
5             [UIImage imageNamed:@"tab_select_indicator"]];   // 设置UITabBar用户选中某项时,此项的背景图片

 

posted @ 2013-02-18 14:12  diablo大王  阅读(309)  评论(0编辑  收藏  举报