I am developing one application.In that i am doing comparision operation for two images like below
UIImage *actual_image=usrcheck_image.image;
NSData *present_image = UIImagePNGRepresentation(actual_image);
NSData *compare_image = UIImagePNGRepresentation([UIImage imageNamed:@"unchk-1.png"]);
if([present_image isEqualToData:compare_image])
{
set the checked image
}
else
{
set the uncheck image.
}
If i run this,check image is changed to uncheck.But uncheck image is not chneged to check image.Everytime else block is executed.So please help me how to compare these two images.This code is working perfectly in device.But the problem is in simulator only.