如何
setSelectionIndicatorImage 的图片周围有空隙的话,只需要自己画一个image就可以,
[[UITabBar appearance] setSelectionIndicatorImage:[self imageWithColorSize:[UIColor colorWithRed:234/255.0 green:104/255.0 blue:162/255.0 alpha:1] size:CGSizeMake(SCREEN_WIDTH/3, tabBar.frame.size.height)]];
- (UIImage *)imageWithColorSize:(UIColor *)color size:(CGSize)size
{
UIGraphicsBeginImageContextWithOptions(size, false, 0);
[color setFill];
UIRectFill(CGRectMake(0, 0, size.width, size.height));
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}