I think you're in overkill mode :). Try setting button.png for UIControlStateNormal and buttonActive.png for UIControlStateHighlighted. No need to rest. See if this works.
EDIT:
Also, remember: Image file names are case sensitive.
Are you testing a device? Image names are case sensitive for device assembly, but not for the simulator. For example, if your actual image file is called buttonactive.png, but you call it as buttonActive.png from your code, it will be displayed on the simulator, but not on the device.
Make sure the case for both image names matches the name of the actual file.
EDIT # 2:
Try this code
button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setSelected:YES]; button.frame = CGRectMake(x, y, width, height); [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [button setTitleColor:[UIColor blueColor] forState:UIControlStateSelected]; [button setTitle:@"Button Title" forState:UIControlStateNormal]; [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; [button setBackgroundImage:[UIImage imageNamed:@"button.png"] forState:UIControlStateNormal]; [button setBackgroundImage:[UIImage imageNamed:@"buttonActive.png"] forState:UIControlStateHighlighted];
source share