mahclark mahclark - 1 year ago 103
Swift Question

Swift, Xcode - Increasing the size of a UISwitch

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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download