NSString *news = @"新闻";
NewsViewController *newsVC = [[NewsViewController alloc] init];
newsVC.title = news;
UINavigationController *newNC = [[UINavigationController alloc] initWithRootViewController:newsVC];
newNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:news image:[UIImage imageNamed:@"tabbar_icon_news_normal"] selectedImage:[UIImage imageNamed:@"tabbar_icon_news_highlight"]];
NSString *reading = @"阅读";
ReadViewController *readingTVC = [[ReadViewController alloc]init];
readingTVC.title = reading;
UINavigationController *readingNC = [[UINavigationController alloc] initWithRootViewController:readingTVC];
readingNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:reading image:[UIImage imageNamed:@"tabbar_icon_reader_normal"] selectedImage:[UIImage imageNamed:@"tabbar_icon_reader_highlight"]];
NSString *video = @"视听";
ViewController *videoTVC = [[ViewController alloc]init];
// videoTVC.title = video;
UINavigationController *videoNC = [[UINavigationController alloc] initWithRootViewController:videoTVC];
videoNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:video image:[UIImage imageNamed:@"tabbar_icon_media_normal"] selectedImage:[UIImage imageNamed:@"tabbar_icon_media_highlight"]];
NSString *mine = @"我们";
MineTableViewController *mineTVC = [[MineTableViewController alloc] initWithStyle:UITableViewStyleGrouped];
mineTVC.title = mine;
UINavigationController *mineNC = [[UINavigationController alloc] initWithRootViewController:mineTVC];
mineNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:mine image:[UIImage imageNamed:@"tabbar_icon_me_normal"] selectedImage:[UIImage imageNamed:@"tabbar_icon_me_highlight"]];
self.viewControllers = @[newNC, readingNC, videoNC, mineNC];
网友评论