Could not load the “” image referenced from a nib

前端 未结 21 2371
广开言路
广开言路 2020-12-23 19:21

I have no images called \"\" (nothing). I\'ve gone through the .xib file of the screen where this pops up and can\'t find anything that would cause this. Anybody who have ha

21条回答
  •  甜味超标
    2020-12-23 20:01

    Just for reference, this problem is also caused by using .jpg images and referencing them inside of storyboards/nibs. iOS 8 appears to be able to handle the proper type checking between jpg and png images at runtime. However, on iOS 7 and below you will need to manually set the image in the code and remove the image reference inside of the storyboard to get rid of the warning.

    Remember you need to manually set the .jpg when referencing jpg images.

    [self.imageView setImage:[UIImage imageNamed:@"yourImage.jpg"]];
    

提交回复
热议问题