Change color of UISwitch appwise

前端 未结 6 2162
孤独总比滥情好
孤独总比滥情好 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:05

    Take a look at the custom UISwitch control that I built to allow me to change the background color of the control. You could use the same method to change the text, the font, or the text color very easily.

    http://www.homick.com/posts/custom-uiswitch-control

    The code is available on GitHub and includes a PSD that is used to build three different PNG files that the control uses. You can modify the contents of the psd to recreate the PNG files in whatever format you like. Swap those into the control and away you go.

    This gives a lot more options than just orange and blue.

提交回复
热议问题