开发者

iOS - 1000's of literal strings, how to handle?

I开发者_开发技巧 have a few thousand literal strings in my app.

I currently have them all listed in my .m file.

I don't have a problem doing it this way, and it works for my app.

Is this not a best practice? Should I house my string data in an external DB?

Thank You.


Several thousand literal strings sounds annoying, but that's the worst of it. A database probably would be overkill and hard to maintain. So long as you can localize your app when/if you need to, it should be fine.


This is the kind of thing SQLite was MEANT for.

The minute you instantiate that object, all those strings are taking up memory, including the vast majority of which you probably won't use on any particular trip through the app. I'd sure rather have a database I could just query up the ones I need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜