I am trying to load a .PNG image located in my XCode project as UIImage
- but the constructor of UIImage
that takes file name returns nil
.
Please see the screenshot for my setup:
Here are some details:
- The project is in Swift
- I am constructing the
UIImage
in global variable (lazyly) - The issue is pressent in simulator and on the device (iPhone 5S)
- I have added same image several times with different names to make sure incorrect naming is not the cause (see all the names in left red rectange)
- all images are added to
EasyTypeShared
target, which is a library project embedded into runeableEasyType
project. - I did not do any axtra steps - just added the image files to my workspace (and the
EasyTypeShared
target) and run the app
EDIT: According to this blog the cause might be that workspace setup - more preciselly that the image is being loaded by framework. Not sure but in lack of better ideas I will follow this track. If you can cast some light on the matter I would by really thankful for any ideas.