@@ -44,7 +44,7 @@ @implementation CYLTabBarControllerConfig
44
44
- (CYLTabBarController *)tabBarController {
45
45
if (_tabBarController == nil ) {
46
46
CYLTabBarController *tabBarController = [CYLTabBarController tabBarControllerWithViewControllers: self .viewControllers
47
- tabBarItemsAttributes: self .tabBarItemsAttributesForController];
47
+ tabBarItemsAttributes: self .tabBarItemsAttributesForController];
48
48
[self customizeTabBarAppearance: tabBarController];
49
49
_tabBarController = tabBarController;
50
50
}
@@ -85,31 +85,31 @@ - (NSArray *)viewControllers {
85
85
}
86
86
87
87
- (NSArray *)tabBarItemsAttributesForController {
88
- NSDictionary *dict1 = @{
89
- CYLTabBarItemTitle : @" 首页" ,
90
- CYLTabBarItemImage : @" home_normal" ,
91
- CYLTabBarItemSelectedImage : @" home_highlight" ,
92
- };
93
- NSDictionary *dict2 = @{
94
- CYLTabBarItemTitle : @" 同城" ,
95
- CYLTabBarItemImage : @" mycity_normal" ,
96
- CYLTabBarItemSelectedImage : @" mycity_highlight" ,
97
- };
98
- NSDictionary *dict3 = @{
99
- CYLTabBarItemTitle : @" 消息" ,
100
- CYLTabBarItemImage : @" message_normal" ,
101
- CYLTabBarItemSelectedImage : @" message_highlight" ,
102
- };
103
- NSDictionary *dict4 = @{
104
- CYLTabBarItemTitle : @" 我的" ,
105
- CYLTabBarItemImage : @" account_normal" ,
106
- CYLTabBarItemSelectedImage : @" account_highlight"
107
- };
88
+ NSDictionary *firstTabBarItemsAttributes = @{
89
+ CYLTabBarItemTitle : @" 首页" ,
90
+ CYLTabBarItemImage : @" home_normal" ,
91
+ CYLTabBarItemSelectedImage : @" home_highlight" ,
92
+ };
93
+ NSDictionary *secondTabBarItemsAttributes = @{
94
+ CYLTabBarItemTitle : @" 同城" ,
95
+ CYLTabBarItemImage : @" mycity_normal" ,
96
+ CYLTabBarItemSelectedImage : @" mycity_highlight" ,
97
+ };
98
+ NSDictionary *thirdTabBarItemsAttributes = @{
99
+ CYLTabBarItemTitle : @" 消息" ,
100
+ CYLTabBarItemImage : @" message_normal" ,
101
+ CYLTabBarItemSelectedImage : @" message_highlight" ,
102
+ };
103
+ NSDictionary *fourthTabBarItemsAttributes = @{
104
+ CYLTabBarItemTitle : @" 我的" ,
105
+ CYLTabBarItemImage : @" account_normal" ,
106
+ CYLTabBarItemSelectedImage : @" account_highlight"
107
+ };
108
108
NSArray *tabBarItemsAttributes = @[
109
- dict1 ,
110
- dict2 ,
111
- dict3 ,
112
- dict4
109
+ firstTabBarItemsAttributes ,
110
+ secondTabBarItemsAttributes ,
111
+ thirdTabBarItemsAttributes ,
112
+ fourthTabBarItemsAttributes
113
113
];
114
114
return tabBarItemsAttributes;
115
115
}
0 commit comments