0

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?

2 Answers 2

1

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 key is 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.

Sign up to request clarification or add additional context in comments.

Comments

1

Yes you can! I use it to list website URLs used in my app. This makes it extremely easy to change in the app, if the website URL ever changes. There is no problem with doing this.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.