I would like to put all the images that I use in my application into the same file and access them by key.
Is it possible to use the .strings file for this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you mean you want to put the image names, yes it’s possible.
In your code, just use things like
[UIImage imageNamed:NSLocalizedString(key, @"")];Where
keyis the key that points to the name of your image. Then in the .strings files, point to the right image file based on the locale.