I am working on UISwitch, i want to set on Image and off Image for UISwitch in storyboard but image is not set on switch.
I want to create like this:
Not like this --->
Thanks in advance.
I am working on UISwitch, i want to set on Image and off Image for UISwitch in storyboard but image is not set on switch.
I want to create like this:
Not like this --->
Thanks in advance.
You can use UIButton in place of UISwitch as its useful and also time saving and easy to customise..
use image slicing for UIButton like you are using UISwitch and set it as Background image like this
[cell.btnSwitch setBackgroundImage:[UIImage imageNamed:@"switchOn"] forState:UIControlStateNormal];
[cell.btnSwitch setBackgroundImage:[UIImage imageNamed:@"switchOff"] forState:UIControlStateNormal];
You can detect the switch on/off state programmatically and set image.