G
G
Gleb2021-12-03 11:49:59
Swift
Gleb, 2021-12-03 11:49:59

Why don't colors work on iOS 13?

for some reason it button.setTitleColor(.green, for: .normal)doesn’t work and instead of green comes blue (standard color)
For some reason this only works on iOS 13, everything works on 14 and 15.
What could be the reason for this?) I sin on UIBarButtonItem but I don’t know where to dig

private lazy var resetItem: UIBarButtonItem = {
        let button = UIButton()
        button.addTarget(self, action: #selector(reset), for: .touchUpInside)
        button.setTitleColor(.green, for: .normal)
        button.setTitle("Применить", for: .normal)
        button.setTitle("", for: .disabled)
        button.sizeToFit()
        return UIBarButtonItem(customView: button)
    }()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Araya, 2021-12-03
@Araya

Try PropertytintColor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question