在UITabBarController.m里面initWithAttribute方法里面替换自己的自定义TabBar
#import “GuangXi_TabBar.h"
@interface UITabBarController () <GuangXi_TabBarDelegate> {
GuangXi_TabBar *guangxi_TabBar;
}
- (instancetype)initWithAttribute:(NSDictionary *)attribute
{
if (self = [super init]) {
guangxi_TabBar = [[GuangXi_TabBar alloc] initWithFrame:CGRectMake(0, -28, SCREEN_WIDTH, TabBar_Height_1)];
guangxi_TabBar.tabBarDelegate = self;
[self setValue:guangxi_TabBar forKey:@"tabBar"];
self.tabBar.tintColor = NavigationBar_Back_Color;
self.viewControllers = _viewControllers;
self.selectedIndex = 0;
}
return self;
}