If I instantiate a UIImage like this :
UIImage *image = [[UIImage alloc] init];
The object is created but it doesn\'t contain any image.
You can check if it has any image data.
UIImage* image = [[UIImage alloc] init];
CGImageRef cgref = [image CGImage];
CIImage *cim = [image CIImage];
if (cim == nil && cgref == NULL)
{
NSLog(@"no underlying data");
}
[image release];
let image = UIImage()
let cgref = image.cgImage
let cim = image.ciImage
if cim == nil && cgref == nil {
print("no underlying data")
}