I created a switch in cellForRowAtIndexPath like this.
UISwitch *switchView = [[UISwitch alloc] initWithFrame:CGRectZero];
CGRectZero is equivalent to CGRectMake (0,0,0,0). But the switch is displayed in normal size. I did not indicate the actual size. Please explain to me how the code works.
user698200
source share