添加基本页面
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#import "BaseTabBarController.h"
|
||||
#import "HomeVC.h"
|
||||
#import "MyVC.h"
|
||||
#import "BaseNavigationController.h"
|
||||
|
||||
@interface BaseTabBarController ()
|
||||
|
||||
@@ -17,7 +18,18 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
// Setup two tabs: Home & My, each embedded in BaseNavigationController
|
||||
HomeVC *home = [[HomeVC alloc] init];
|
||||
home.title = @"首页";
|
||||
BaseNavigationController *navHome = [[BaseNavigationController alloc] initWithRootViewController:home];
|
||||
navHome.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"首页" image:nil selectedImage:nil];
|
||||
|
||||
MyVC *my = [[MyVC alloc] init];
|
||||
my.title = @"我的";
|
||||
BaseNavigationController *navMy = [[BaseNavigationController alloc] initWithRootViewController:my];
|
||||
navMy.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"我的" image:nil selectedImage:nil];
|
||||
|
||||
self.viewControllers = @[navHome, navMy];
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user