简体   繁体   中英

non localized images not recognized in localized xib files

I localized and xib files to two languages , the xib contains a UIImageView and UIButtons that I set the value of their image property for the Interface Builder, when i use localized images to set these properties everything works ok and the images appear on run time , but when i use non localized image the images just don't show and i get this on the log

"Could not load the "greenBackgroundImage.png" image referenced from a nib in the bundle with identifier "(null)"

I don't want to end up localizing all my images even if I'm using the same image for both languages.

any help is appreciated

Sounds like your non-localized images don't end up in your bundle. Have a look in your build settings (select your project > select target > Build Phases > expand section Copy Bundle Resources). If greenBackgroundImage.png isn't listed there, just add it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM