修改UIButton不同状态下的图片

参考代码:

UIButton *bt  = [[UIButton alloc] init];

[bt setBackgroundImage:[UIImage imageNamed:@"scenic_spots_background_focused.png"] forState:UIControlStateNormal];

[bt setBackgroundImage:[UIImage imageNamed:@"scenic_spots_background_pressed.png"] forState:UIControlStateHighlighted];


THE  END!

你可能感兴趣的:(UIButton)