How to change the UISwitch default color(blue)

How to change the default color(blue) of a UISwitch?


I think what you are looking for is something like this

UISwitch *testSwitch; //just something I made up
[testSwitch setOnTintColor:[UIColor greenColor]];

In Xcode 5 and iOS 7 it's now in the attributes inspector:

enter image description here

Changing the On Tint will change the button's color when it's turned on.

enter image description here

I hope that's what you were looking for! Even though you posted that question like three years ago.