Skip to content

Commit 6106010

Browse files
committed
fix typo ,which cause issue ChenYilong#28
1 parent 0e1214e commit 6106010

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

Example/Classes/CYLTabBarControllerConfig.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ + (void)customizeTabBarAppearance {
127127
// 设置文字属性
128128
UITabBarItem *tabBar = [UITabBarItem appearance];
129129
[tabBar setTitleTextAttributes:normalAttrs forState:UIControlStateNormal];
130-
[tabBar setTitleTextAttributes:selectedAttrs forState:UIControlStateHighlighted];
130+
[tabBar setTitleTextAttributes:selectedAttrs forState:UIControlStateSelected];
131131

132132
// Set the dark color to selected tab (the dimmed background)
133133
// TabBarItem选中后的背景颜色

Example/Classes/Mine/CYLMineViewController.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,5 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
4646
[tableView deselectRowAtIndexPath:indexPath animated:YES];
4747
[self.navigationController.tabBarItem setBadgeValue:[NSString stringWithFormat:@"%@", @(indexPath.row + 1)]];
4848
}
49+
4950
@end

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ pod update
230230
// 设置文字属性
231231
UITabBarItem *tabBar = [UITabBarItem appearance];
232232
[tabBar setTitleTextAttributes:normalAttrs forState:UIControlStateNormal];
233-
[tabBar setTitleTextAttributes:normalAttrs forState:UIControlStateHighlighted];
234-
233+
[tabBar setTitleTextAttributes:selectedAttrs forState:UIControlStateSelected];
234+
235235
// 设置背景图片
236236
UITabBar *tabBarAppearance = [UITabBar appearance];
237237
[tabBarAppearance setBackgroundImage:[UIImage imageNamed:@"tabbar_background"]];

0 commit comments

Comments
 (0)