Swift application, Xcode 14.2. Target 16.2. I have UIButton in my storyboard with properties "Type: Custom, Style: Default". If I set an image from .xcassets file, on preview everything ok, on emulator also. But if I test it on real device, image is invisible (without image). Same thing can be reproduced on emulator, if uncheck "debug executable" in "Edit Scheme" of Product. In every View controller the same problem, so I think it is something globally on application level.
My project is a copy from another old one. May be some applications settings are different or something else. May be somebody know correct way, where I should search.
Interesting moment, that if I create new empty application, just copy button with all properties, everything works OK - button shows correctly with Image.
The solution is founded. Just need to remove extension of UIButton:
extension UIButton {
open override func layoutSubviews() {
super.layoutSubviews()
}}
It is working correctly on IOS 13, but have some bug on the latest versions.