I am customizing my UIButton and I can either set image or background image. They both work fine but how do I decide which one to use? Are these two methods for when people have image that are broken up into foreground and background so they can layer them?
The background image is scaled to fill the bounds of the UIButton, and is displayed behind the title. The foreground image is not scaled, and displayed next to the button title.
So if you want to put a title on your button, use the background image.
The background image serves for you to customize the "button image", the common background that all your buttons will take. The button image itself will lay on top of the background image and you can use to add, e.g., a small icon to further decorate the contents of the button.
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