tabbar修改

This commit is contained in:
chenshuanglin
2023-03-06 18:55:01 +08:00
parent 1414d2fea7
commit 658a7966e7
23 changed files with 57 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 865 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 871 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 938 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tab_party_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tab_party_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tab_party_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tab_party_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -504,11 +504,11 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)initTabs:(BOOL)logined { - (void)initTabs:(BOOL)logined {
self.viewControllers = nil; self.viewControllers = nil;
NSArray *normalImageNames = @[@"tab_gameHome_normal",@"tab_monents_normal",@"tab_message_normal", @"tab_mine_normal"]; NSArray *normalImageNames = @[@"tab_gameHome_normal",@"tab_party_normal",@"tab_monents_normal",@"tab_message_normal", @"tab_mine_normal"];
NSArray *selectImageNames = @[@"tab_gameHome_selected",@"tab_monents_select",@"tab_message_selected", @"tab_mine_selected"]; NSArray *selectImageNames = @[@"tab_gameHome_selected",@"tab_party_selected",@"tab_monents_select",@"tab_message_selected", @"tab_mine_selected"];
NSArray *tabLabel = @[@"派对",@"广场",@"消息", @"我的"]; NSArray *tabLabel = @[@"首页",@"派对",@"动态",@"消息", @"我的"];
UIViewController *game; UIViewController *party;
UIViewController *msg; UIViewController *msg;
UIViewController *me; UIViewController *me;
UIViewController * home; UIViewController * home;
@@ -522,22 +522,23 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
#endif #endif
msg = [[SessionListViewController alloc] init]; msg = [[SessionListViewController alloc] init];
me = [[XPMineViewController alloc] init]; me = [[XPMineViewController alloc] init];
party = [[BaseViewController alloc]init];
// home = [[XPHomeViewController alloc] init]; // home = [[XPHomeViewController alloc] init];
home = [[XPNewHomeViewController alloc] init]; home = [[XPNewHomeViewController alloc] init];
monents = [[XPMonentsViewController alloc] init]; monents = [[XPMonentsViewController alloc] init];
} else { } else {
game = [[BaseViewController alloc]init]; party = [[BaseViewController alloc]init];
msg = [[SessionListViewController alloc]init]; msg = [[SessionListViewController alloc]init];
me = [[BaseViewController alloc]init]; me = [[BaseViewController alloc]init];
home = [[BaseViewController alloc] init]; home = [[BaseViewController alloc] init];
monents = [[BaseViewController alloc] init]; monents = [[BaseViewController alloc] init];
} }
[self createTabBarItem:home title:tabLabel[0] image:normalImageNames[0] selectedImage:selectImageNames[0]]; [self createTabBarItem:home title:tabLabel[0] image:normalImageNames[0] selectedImage:selectImageNames[0]];
[self createTabBarItem:monents title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]]; [self createTabBarItem:party title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]];
[self createTabBarItem:msg title:tabLabel[2] image:normalImageNames[2] selectedImage:selectImageNames[2]]; [self createTabBarItem:monents title:tabLabel[2] image:normalImageNames[2] selectedImage:selectImageNames[2]];
[self createTabBarItem:me title:tabLabel[3] image:normalImageNames[3] selectedImage:selectImageNames[3]]; [self createTabBarItem:msg title:tabLabel[3] image:normalImageNames[3] selectedImage:selectImageNames[3]];
self.viewControllers = @[home,monents,msg,me]; [self createTabBarItem:me title:tabLabel[4] image:normalImageNames[4] selectedImage:selectImageNames[4]];
self.viewControllers = @[home,party,monents,msg,me];
self.selectedIndex = 0; self.selectedIndex = 0;
} }
@@ -545,8 +546,8 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
itemVc.title = title; itemVc.title = title;
itemVc.tabBarItem.image = [[UIImage imageNamed:image] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; itemVc.tabBarItem.image = [[UIImage imageNamed:image] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
itemVc.tabBarItem.selectedImage = [[UIImage imageNamed:selectedImage] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; itemVc.tabBarItem.selectedImage = [[UIImage imageNamed:selectedImage] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]} forState:UIControlStateSelected]; [itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor mainTextColor]} forState:UIControlStateSelected];
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor secondTextColor]} forState:UIControlStateNormal]; [itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor textThirdColor]} forState:UIControlStateNormal];
BaseNavigationController *nav = [[BaseNavigationController alloc] initWithRootViewController:itemVc]; BaseNavigationController *nav = [[BaseNavigationController alloc] initWithRootViewController:itemVc];
return nav; return nav;
} }