处理UI
This commit is contained in:
@@ -124,6 +124,13 @@
|
||||
for (NSInteger i = 0; i < self.buttons.count; i++) {
|
||||
UIButton *button = self.buttons[i];
|
||||
button.selected = (i == self.selectedIndex);
|
||||
|
||||
// 特殊处理:社区按钮(索引2)选中时文字颜色为白色
|
||||
if (i == 2 && button.selected) {
|
||||
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
|
||||
} else if (i == 2) {
|
||||
[button setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user