创建nav宏

去除tabbar透明
This commit is contained in:
2025-11-06 16:57:28 +08:00
parent 1f45564539
commit a75afbe4c1
3 changed files with 62 additions and 1 deletions

View File

@@ -19,6 +19,8 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self setupTabbarAppearance];
// Setup two tabs: Home & My, each embedded in BaseNavigationController
HomeMainVC *home = [[HomeMainVC alloc] init];
home.title = @"首页";
@@ -36,6 +38,18 @@
/*[[KBAuthManager shared] saveAccessToken:@"TEST" refreshToken:nil expiryDate:[NSDate dateWithTimeIntervalSinceNow:3600] userIdentifier:nil]*/;
}
- (void)setupTabbarAppearance{
// TabBar view TabBar
self.tabBar.translucent = NO;
if (@available(iOS 15.0, *)) {
UITabBarAppearance *a = [UITabBarAppearance new];
[a configureWithOpaqueBackground];
a.backgroundColor = [UIColor whiteColor];
self.tabBar.standardAppearance = a;
self.tabBar.scrollEdgeAppearance = a;
}
}
/*
#pragma mark - Navigation

View File

@@ -83,7 +83,11 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
HomeRankVC *vc = [[HomeRankVC alloc] init];
[self.navigationController pushViewController:vc animated:true];
// [self.navigationController pushViewController:vc animated:true];
UINavigationController *nav = KB_CURRENT_NAV;
[nav pushViewController:vc animated:true];
NSLog(@"===");
}
#pragma mark - Lazy