Based on this: Several images on one UIButton
I can add images on UIButton, but I can't show the highlighted state UIImageView inside the UIButton.
Have set the highlighted image as follows:
imageOneOnButton.image = [UIImage imageNamed:@"option-unchecked"];
imageOneOnButton.highlightedImage = [UIImage imageNamed:@"option-checked"];
imageTwoOnButton.image = [UIImage imageNamed:@"option-unchecked"];
imageTwoOnButton.highlightedImage = [UIImage imageNamed:@"option-checked"];
Unfortunately on its action:
sender.highlighted = YES // or NO doesn't work
sender.imageView.highlighted = YES // or NO doesn't work as well
Is there any way that I can simulate this,
[button setImage:[UIImage imageNamed:@"option-unchecked"] forState:UIControlStateNormal];
[button setImage:[UIImage imageNamed:@"option-unchecked"] forState:UIControlStateHighlighted];
button.highlighted = YES // or NO <-- works!
using my approach?