Quantcast
Channel: Where to store constant strings - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Where to store constant strings

$
0
0

In my app i have about 30 strings i would like to store somewhere. I want to use it in couple classes later, and it will be used only once in every class. Where is the best place to store it? I read about singleton class in ios, but i'm not sure if this is solution for me.

I want to make something like NSArray where in for loop i can search the array.

I've tried to define it like:

NSArray *arr = [NSArray arrayWithObjects:@"something",@"else", nil];

But i can do it in .h file, and i'm not sure if for constant variables i want to have a class.


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>