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.
UISwitch is not customizable, this also applies to the size.
UISwitch overrides
initWithFrame:and enforces a size appropriate for the control. The size components of the given rectangle are ignored.