currentImage = ...//当前的UIImage UIImage *defaultImage = ...;//default Image NSData *currentImageData = UIImagePNGRepresentation(currentImage); NSData *defaultImageData = UIImagePNGRepresentation(defaultImage); if ([currentImageData isEqual:defaultImageData]) { ....//比较两个是否相等,然后处理 return; }
原文地址:http://blog.csdn.net/dauihiy/article/details/43602693