Hey i get this Warning in my code and want to resolve it but i find no solution:
'adjustsImageWhenDisabled' was deprecated in iOS 15.0: This property is ignored when using UIButtonConfiguration, you may customize to replicate this behavior via a configurationUpdateHandler
Does anyone have an idea how to resolve the warning?
I have no idea how to solve it.
You should set up a ConfigurationUpdateHandler where you should switch between your button states to set up your button's imageView's tintAdjustmentMode.
btn.configurationUpdateHandler = { button in
switch button.state {
case .disabled:
button.imageView?.tintAdjustmentMode = .dimmed
break
default:
button.imageView?.tintAdjustmentMode = .normal
break
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With