[Solved] Xcode: Set a button background image to change everytime the button is pressed
Follow this sample logic .This may be useful for you. -(void)viewDidLoad{ isCount = 0; // int value. UIImage * image1 = [UIImage imageNamed:@”SampleImage1.png”]; UIImage * image2 = [UIImage imageNamed:@”SampleImage2.png”]; UIImage * image3 = [UIImage imageNamed:@”SampleImage3.png”]; UIImage * image4 = [UIImage imageNamed:@”SampleImage4..png”]; UIImage * image5 = [UIImage imageNamed:@”SampleImage5.png”]; UIImage * image6 = [UIImage imageNamed:@”SampleImage6.png”]; UIImage * … Read more