UIButton image behavior changed in iOS 15?

Is this a change in iOS 15?

Yes and no. There is indeed a change in iOS 15, but the reason for the problem you’re experiencing is a change in Xcode 13.

The change in iOS 15 is that there’s a whole new way of configuring a button. This starts with giving the button one of four new iOS 15 types: Plain, Gray, Tinted, and Filled. If you set your button to have any of those types, you are opting in to the new behavior.

The problem you’re seeing is because, in Xcode 13, when you make a button in the storyboard, it does give the button one of those types: Plain. So you have opted into the new dispensation without knowing it!

The solution, if you want the old behavior, is to change the Style pop-up menu (in the Attributes inspector) from Plain to Default. Now you have an old-style button and it will behave in the way you’re accustomed to.

(Of course, in the long run, you’re going to want to adopt the new dispensation. I’m just explaining the apparent change in behavior.)

Leave a Comment