Change color of UISwitch appwise

前端 未结 6 2069
孤独总比滥情好
孤独总比滥情好 2021-02-12 22:29

I am using UISwitch in iOS 3 to make a switch element in my app. It has default color set to blue, but I want to change its color to brown.

How can I choose

6条回答
  •  情话喂你
    2021-02-12 23:14

    For Swift 3:

    var mySwitch : UISwitch = ...
    mySwitch.onTintColor = UIColor.blue
    

提交回复
热议问题