Error: Cuicatalog: Invalid Asset Name Supplied: (Null), or Invalid Scale Factor:2.000000

CUICatalog: Invalid asset name supplied warning

It may happen when try to load unknown image. Please check a correct image name is passed for imageName

[UIImage imageNamed:imageName]

UIRefreshControl warns: CUICatalog: Invalid asset name or invalid scale factor

So basically this had nothing to do with the refreshcontrol but with the image name used while init'ing the image.
I used to do this:

[UIImage imageNamed:[someDictionary objectForKey:@"imageKey"]];

But what I really needed to do is this:

[UIImage imageNamed:[NSString stringWithFormat:@"%@",[someDictionary objectForKey:@"imageKey"]]];

So by turning it into an NSString, the error isn't produced anymore. Sure you need to have a @2x paired image, but even if you have those, without NSString'ing the name, you'll still get this error.



Related Topics



Leave a reply



Submit