Skip to content

In iOS 13, tintColor property doesn't seem to work any more. Here's the solution how you can change background of your UISwitch without developing a complicated solution with custom class.

Notifications You must be signed in to change notification settings

sashamyshkina/UISwitch-tint-background-in-iOS-13

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

UISwitch color change in iOS 13

In iOS 13 developers can't change tint color of UISwitch in OFF state, which is now light grey by default.

TintColor property, that was traditionally used to change UISwitch's color, doesn't work any more.

Apple, however, hasn't even marked this property as deprecated.

To change tint color in OFF state of UISwitch you need to create a custom class. Or change subviews' color, which is much more easier solution.

This small project contains this solution.

Enjoy!

About

In iOS 13, tintColor property doesn't seem to work any more. Here's the solution how you can change background of your UISwitch without developing a complicated solution with custom class.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages