There are two ways.
The first way, programmatically:
[button setBackgroundImage:buttonimg forState:UIControlStateSelected]; [button setBackgroundImage:buttonimg forState:UIControlStateNormal]; [button setBackgroundImage:buttonimg forState:UIControlStateHighlighted];
The second way using IB Builder:
Like img:

You have the option to choose a state configuration. Based on the configuration, you can set the image in the "Image" section.
Hope this helps ...
source share