判断image是否为空
这里写代码
UIImage *image = [UIImage imageNamed:@""];
CGImageRef cgref = [image CGImage];
CIImage *cim = [image CIImage];
if (cim == nil && cgref == NULL)
{
NSLog(@"no image");
} else {
NSLog(@"imageView has a image");
}