What's the difference between UIButtonType custom, and system. How will a property such as adjustsImageWhenHighlighted affect the image(s) I supply?
What happens if I only supply some images and not others?
TL;DR
If you want to supply a single image, your best bet is a System button which automatically lightens the image in the disabled and highlighted states.
If you want more control over the images, you should use a Custom button and supply up to 4 images.
It's very confusing because there are many properties that affect the appearance of a button:
Even with just these limited amount of properties, there are 256 (2^8) different combinations for a button. Just displaying let alone reasoning about all the options is a difficult task.
Furthermore, there are several other factors that affect the appearance of a button which are beyond the scope of this answer:
Assuming we only pay attention to the properties outlined above, here are 64 of the 256 possibilities:
I used these as the images:
Some notes about naming:
adjustsImageWhenHighlighted=true and adjustsImageWhenDisabled=trueadjustsImageWhenHighlighted=false and adjustsImageWhenDisabled=falseisSelected=false isEnabled=false isHighlighted=falseisSelected=true isEnabled=true isHighlighted=trueisSelected=false isEnabled=true isHighlighted=false.Some observations:
Se state always fallback to the normal image. It doesn't use a shade of the S state.adjustsImageWhenHighlighted=false seems to be ignored for System buttons in the non-selected state!UIButton(), the default buttonType is custom.