I'm updating my apps to iOS 17 and in Xcode 14 this code worked perfectly. However, Xcode 15 decided it wasn't going to let it work anymore. What I want to accomplish is to set the title of the button to be white and the icon to be blue. In other words, I want to control the color of both items separately. I'd also like to know how to set the disabled color of the button using configurations. I've tried using baseBackgroundColor and baseForegroundColor but it doesn't seem to make any difference. In interface builder, the button is bone stock with no attributes except the title text. (system, plain, plain) I've tried .plain(), .tinted(), .borderless() and commenting the line out but noting gives me what I need.
Any help would be greatly appreciated.
` extension UIButton
{
func settingsBtn_Attributes()
{
self.configuration = .plain()
self.configuration?.image = UIImage(systemName: K.Icons.settings, withConfiguration: UIImage.SymbolConfiguration(scale: .large))
self.configuration?.title = K.Tabbar_Names.settings
self.configuration?.attributedTitle?.foregroundColor = .white
self.configuration?.imagePlacement = .top
self.configuration?.titleAlignment = .center
self.configuration?.imagePadding = 6
self.configuration?.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0)
self.configuration?.attributedTitle?.font = .systemFont(ofSize: gMenuTextSize, weight: .regular)
}
}`