I receive JSON data via HTTP and want to display it in MKMapView using custom MKAnnotationView. So no problem so far.
The bad thing is that the REST service can return contact types that do not have equivalents in my .xcassets file. Is there any way to check the entry in the Application Catalog and avoid such messages:
CUICatalog: Invalid asset name: NonExistingImage or invalid scale factor: 2.000000
Example current code:
NSString * imageName = @"NonExistingImage";
if (imageName != nil) {
UIImage * image = [UIImage imageNamed:imageName];
} else {
}
source
share