I want to create a UIButton with the normal black gradient theme in iOS. I’ve looked at the documentation and can’t seem to figure out how to do this. When I create the button, I get a rounded rect button with no color.
Here is my code:
UIButton* leagueTeamButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
Any suggestions on how I can add the standard themed black gradient to the button?
Make one (or two, if you want it change appearance when press down) in Photoshop – or any image processing software – and put into your project’s resource folder, use the following code to add the image as a UIButton: