标签:
self.tabBar.items = @[//客户
@{@"normal": @"tabbar/kehu.png",
@"selected": @"tabbar/kehu_sel.png"},
//保单
@{@"normal": @"tabbar/baodan.png",
@"selected": @"tabbar/baodan_sel.png"},
//计划
@{@"normal": @"tabbar/jihua.png",
@"selected": @"tabbar/jihua_sel.png"},
//活动
@{@"normal": @"tabbar/huodong.png",
@"selected": @"tabbar/huodong_sel.png"},
//销售
@{@"normal": @"tabbar/xiaoshou.png",
@"selected": @"tabbar/xiaoshou_sel.png"}
//伙伴
@{@"normal": @"tabbar/huoban.png",
@"selected": @"tabbar/huoban_sel.png"},
//设置
@{@"normal": @"tabbar/shezhi.png",
@"selected": @"tabbar/shezhi_sel.png"},
//消息
@{@"normal": @"tabbar/message.png",
@"selected": @"tabbar/message_sel.png"}, //工具
//工具
@{@"normal": @"tabbar/tool.png",
@"selected": @"tabbar/tool_sel.png"}
];
self.viewControllers = @[//客户
[self itemVC:@"TPLCustomerListController"],
//保单
[self itemVC:@"TPLPolicyInfoHomeController_new"],
//计划
[self itemVC:@"TPLAgendaHomeController"],
//活动
[self itemVC:@"TPLCallonHomeController"],
//销售
[self itemVC:@"TPLInsuplanHomeController"],
//绩效
[self itemVC:@"TPLReportHomeController"],
//伙伴
[self itemVC:@"TPLPartnerHomeController"],
//设置
[self itemVC:@"TPLSettingHomeController"],
//消息
[self itemVC:@"TPLMessageHomeController"],
//工具
[self itemVC:@"TPLToolHomeViewController"]];
- (UIViewController*)itemVC:(NSString*)className {
TPLViewController* vc = (TPLViewController*)[[NSClassFromString(className) alloc]init];
if (nil == vc) {
return nil;
}
if (![vc isKindOfClass:[TPLTabItemViewController class]]) {
[NSException raise:NSInvalidArgumentException format:@"tabitem基类必须为TPLTabItemViewController"];
}
vc.naviBarHidden = YES;
return [[TPLNavigationController alloc] initWithRootViewController:vc];
}
标签:
原文地址:http://www.cnblogs.com/Harbingwang/p/5767758.html