Could not load the image referenced from a nib in the bundle running on device

后端 未结 30 2135
挽巷
挽巷 2020-12-07 18:24

SplitView[1290:307] Could not load the \"canary04.png\" image referenced from a nib in the bundle with identifier \"xx.co.mycompany.ipad.SplitView\"

30条回答
  •  青春惊慌失措
    2020-12-07 19:12

    I've encountered this issue when I was trying to set image of an imageView on Interface Builder (.xib) file.

    (I was using Image Assets)

    I've had 2 images with theImage.jpeg and theImage@2x.jpg Interface Builder could be able to display true images at compile time with these jpg / jpeg formats. But I've got this error in the runtime:

    Could not load the "theImage" image referenced from a nib in the bundle with identifier "org.etc.etc"
    

    Then I changed my image files formats to .png and it worked!

    Try this solution too if you have different formats for images you try to set.

提交回复
热议问题