I have two buttons in my view.
[button1 setBackgroundImage:image1 forState:UIControlStateNormal];
[button2 setBackgroundImage:image2 forState:UIControlStateNormal];
How can I compare two images in these buttons? I’de tried:
if (button1.imageView.image.CGImage == button2.imageView.image.CGImage)
{
NSLog(@"equal");
}
else
{
NSLog(@"not equal");
}
It doesn’t work :(.
any advice?
thanks for Help
Yayo
Try this