I created switch in cellForRowAtIndexPath like this.
UISwitch *switchView = [[UISwitch alloc] initWithFrame:CGRectZero];
CGRectZero is equivalent to CGRectMake(0,0,0,0). But, switch is seen in normal size. I didn't specified actuall size. Please explain to me how above code works.
preguntado el 27 de agosto de 11 a las 15:08
UISwitch is not customizable, this also applies to the size.
initWithFrame: and enforces a size appropriate for the control. The size components of the given rectangle are ignored.