Pregunta

I have a custom Resource bundle where i'll have all my images and localization files inside it.

When I assign some images in xib I have to type the entire path where image resides inside my bundle for example MyResource.bundle/Images/Event/xxx.png.

Which means in xib it always taking apps main bundle for images.

Here my question is is there any possibility is there like I can change the default bundle preference to MyResource.bundle/Images So that I can see the image in xib when assigning to a uiimageView or any other.

¿Fue útil?

Solución

preference? in simple words its not possible because there is no property like that, so you need to find out a way to achieve this, but i have used bundle for resources but not have this kinda problem because bundle is logical path

Otros consejos

My solution is add one image manager to manage your image resource. I mean when you need an image, you just call your manager's method passing in the image name. And your image manager will read the correct image file from corresponding bundle and return it based on device's language.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top