我有以下代码:
- (IBAction)buttonSectionPressed:(id)sender {
if ([self.switchReloadOnlyDontToggleVissibility isOn]) {
[self updateCells:self.section2Cells];
} else {
BOOL hide = ([sender tag] == 0);
[self cells:self.section2Cells setHidden:hide];
}
[self reloadDataAnimated:([self.switchAnimated isOn])];
}
我有一个问题
BOOL hide = ([sender tag] == 0);
是否检查 (sender.tag == 0) 然后将其分配为隐藏?所以,(如果 sender.tag != 0),隐藏不存在?