1
This commit is contained in:
@@ -154,12 +154,15 @@
|
||||
|
||||
- (void)customTabBar:(KBCustomTabBar *)tabBar
|
||||
didSelectItemAtIndex:(NSInteger)index {
|
||||
// 登录检查
|
||||
// 登录检查:未登录时跳登录页,不切换 Tab,不更新选中状态
|
||||
if ((index == 1 || index == 2 || index == 3) && ![KBUserSessionManager shared].isLoggedIn) {
|
||||
[[KBUserSessionManager shared] goLoginVC];
|
||||
return;
|
||||
}
|
||||
|
||||
// 更新自定义 TabBar 的选中状态
|
||||
[self.customTabBar setSelectedIndex:index];
|
||||
|
||||
// 切换 VC
|
||||
self.selectedIndex = index;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user