Files
keyboard/keyBoard/Class/Base/VC/BaseTabBarController.m
2025-11-03 18:45:06 +08:00

48 lines
1.5 KiB
Objective-C

//
// BaseTabBarController.m
// keyBoard
//
// Created by Mac on 2025/10/29.
//
#import "BaseTabBarController.h"
#import "HomeVC.h"
#import "MyVC.h"
#import "BaseNavigationController.h"
#import "KBAuthManager.h"
@interface BaseTabBarController ()
@end
@implementation BaseTabBarController
- (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];
[[KBAuthManager shared] saveAccessToken:@"TEST" refreshToken:nil expiryDate:[NSDate dateWithTimeIntervalSinceNow:3600] userIdentifier:nil];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end