After updating to Swift 4, I am getting a compiler error:
Static member 'appearance' cannot be used on protocol metatype 'UIAppearance.Protocol'
Here is my viewWillAppear
method in my custom Tab Bar Controller subclass, I am setting the font of the item text.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// compiler error on line below
UIAppearance.appearance().setTitleTextAttributes([NSAttributedStringKey.font: font], for: UIControlState.normal)
}
I'm having trouble fixing this, any guidance would be appreciated, thanks!
UIBarItem.appearance().setTitleTextAttributes ...
– CorfuUIAppearance
. – Legator