Swift, Xcode - Increasing the size of a UISwitch

mahclark picture mahclark · May 27, 2015 · Viewed 10.6k times · Source

I am making my app 'universal' (used on iPhone and iPad) and I have found ways of increasing the size of everything except for UISwitches. Is there a way of doing so?

Any help is greatly appreciated.

Answer

kabiroberai picture kabiroberai · May 27, 2015

According to this answer by the user mxg, just use the following code:

 mySwitch.transform = CGAffineTransformMakeScale(0.75, 0.75)

Of course, you have to change mySwitch to whatever the name of your variable/IBOutlet is.