三部曲;
// 1.让当前选中的按钮取消选中 UIButton *selectedButton;
self.selectedButton.selected = NO;
// 2.让新点击的按钮选中
button.selected = YES;
// 3.新点击的按钮就成为了"当前选中的按钮"
self.selectedButton = button;
时间: 2024-11-03 13:17:50
三部曲;
// 1.让当前选中的按钮取消选中 UIButton *selectedButton;
self.selectedButton.selected = NO;
// 2.让新点击的按钮选中
button.selected = YES;
// 3.新点击的按钮就成为了"当前选中的按钮"
self.selectedButton = button;