tabbar修改
Before Width: | Height: | Size: 799 B After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 865 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 794 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 871 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 938 B After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.7 KiB |
22
xplan-ios/Assets.xcassets/Tabbar/tab_party_normal.imageset/Contents.json
vendored
Normal 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
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Tabbar/tab_party_normal.imageset/tab_party_normal@2x.png
vendored
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
xplan-ios/Assets.xcassets/Tabbar/tab_party_normal.imageset/tab_party_normal@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
22
xplan-ios/Assets.xcassets/Tabbar/tab_party_selected.imageset/Contents.json
vendored
Normal 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
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Tabbar/tab_party_selected.imageset/tab_party_selected@2x.png
vendored
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
xplan-ios/Assets.xcassets/Tabbar/tab_party_selected.imageset/tab_party_selected@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.4 KiB |
@@ -504,11 +504,11 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
|
||||
- (void)initTabs:(BOOL)logined {
|
||||
self.viewControllers = nil;
|
||||
NSArray *normalImageNames = @[@"tab_gameHome_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 *tabLabel = @[@"派对",@"广场",@"消息", @"我的"];
|
||||
NSArray *normalImageNames = @[@"tab_gameHome_normal",@"tab_party_normal",@"tab_monents_normal",@"tab_message_normal", @"tab_mine_normal"];
|
||||
NSArray *selectImageNames = @[@"tab_gameHome_selected",@"tab_party_selected",@"tab_monents_select",@"tab_message_selected", @"tab_mine_selected"];
|
||||
NSArray *tabLabel = @[@"首页",@"派对",@"动态",@"消息", @"我的"];
|
||||
|
||||
UIViewController *game;
|
||||
UIViewController *party;
|
||||
UIViewController *msg;
|
||||
UIViewController *me;
|
||||
UIViewController * home;
|
||||
@@ -522,22 +522,23 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
#endif
|
||||
msg = [[SessionListViewController alloc] init];
|
||||
me = [[XPMineViewController alloc] init];
|
||||
|
||||
party = [[BaseViewController alloc]init];
|
||||
// home = [[XPHomeViewController alloc] init];
|
||||
home = [[XPNewHomeViewController alloc] init];
|
||||
monents = [[XPMonentsViewController alloc] init];
|
||||
} else {
|
||||
game = [[BaseViewController alloc]init];
|
||||
party = [[BaseViewController alloc]init];
|
||||
msg = [[SessionListViewController alloc]init];
|
||||
me = [[BaseViewController alloc]init];
|
||||
home = [[BaseViewController alloc] init];
|
||||
monents = [[BaseViewController alloc] init];
|
||||
}
|
||||
[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:msg title:tabLabel[2] image:normalImageNames[2] selectedImage:selectImageNames[2]];
|
||||
[self createTabBarItem:me title:tabLabel[3] image:normalImageNames[3] selectedImage:selectImageNames[3]];
|
||||
self.viewControllers = @[home,monents,msg,me];
|
||||
[self createTabBarItem:party title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]];
|
||||
[self createTabBarItem:monents title:tabLabel[2] image:normalImageNames[2] selectedImage:selectImageNames[2]];
|
||||
[self createTabBarItem:msg title:tabLabel[3] image:normalImageNames[3] selectedImage:selectImageNames[3]];
|
||||
[self createTabBarItem:me title:tabLabel[4] image:normalImageNames[4] selectedImage:selectImageNames[4]];
|
||||
self.viewControllers = @[home,party,monents,msg,me];
|
||||
self.selectedIndex = 0;
|
||||
}
|
||||
|
||||
@@ -545,8 +546,8 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
itemVc.title = title;
|
||||
itemVc.tabBarItem.image = [[UIImage imageNamed:image] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||
itemVc.tabBarItem.selectedImage = [[UIImage imageNamed:selectedImage] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]} forState:UIControlStateSelected];
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor secondTextColor]} forState:UIControlStateNormal];
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor mainTextColor]} forState:UIControlStateSelected];
|
||||
[itemVc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[ThemeColor textThirdColor]} forState:UIControlStateNormal];
|
||||
BaseNavigationController *nav = [[BaseNavigationController alloc] initWithRootViewController:itemVc];
|
||||
return nav;
|
||||
}
|
||||
|