首先导入库函数 #import “ZTQuickControl.h”
UITabBarController *tbc = [[UITabBarController alloc] init];
UIViewController *vc = [tbc addViewControlerWithClass:[WechatViewController class] title:@"微信" image:@"tabbar_mainframe" selectImage:nil];
vc.navigationController.tabBarItem.imageInsets = UIEdgeInsetsMake(5, 0, -5, 0);
vc = [tbc addViewControlerWithClass:[ContactsViewController class] title:@"联系人" image:@"tabbar_contacts" selectImage:nil];
vc.navigationController.tabBarItem.imageInsets = UIEdgeInsetsMake(5, 0, -5, 0);
vc = [tbc addViewControlerWithClass:[FindViewController class] title:@"发现" image:@"tabbar_discover" selectImage:nil];
vc.navigationController.tabBarItem.imageInsets = UIEdgeInsetsMake(5, 0, -5, 0);
vc = [tbc addViewControlerWithClass:[MeViewController class] title:@"我" image:@"tabbar_me" selectImage:nil];
vc.navigationController.tabBarItem.imageInsets = UIEdgeInsetsMake(5, 0, -5, 0);
[tbc.tabBar setBackgroundImage:[UIImage imageNamed:@"TabbarBkg"]];
self.window.rootViewController = tbc;