as question says, How does imageNamed work when there are multiple files with the given name under the resource directory?
Is there a way to differentiate two different files with same name (but different path)?
Thank you
as question says, How does imageNamed work when there are multiple files with the given name under the resource directory?
Is there a way to differentiate two different files with same name (but different path)?
Thank you
The folders in any Xcode bundle are "groups". That is, they are not actual directories. The files in those groups are still located in the bundle's root.
So, having two (or more) files with the same name in the app bundle is impossible.
See: http://majicjungle.com/blog/?p=123
The problem with Groups:
If you maintain your directory structure by creating folder references, this eliminates the problem of duplicate file names. However, retrieving the files is the problem.
What you can do is use the NSBundle class: