我一直想知道如果他们可能会改变人们如何管理他们的字符串?
就像...您是否硬编码,使用属性列表或字符串文件?还有其他方法吗?
It actually depends on the type of strings, I'll give some examples:
NSLocalizedString
macro.If they are to be used in the classes such as for notifications and/or for dictionary keys you would define them
#define MYOWN_NOTIFICATION @"NotifySth"
#define CITY_KEY @"city"
If you are going to have a small collection of strings then a plist would be the way to go You will then use it to load it inside an NSDictionary or NSArray
If you have a large collection of strings then store them in a db and query the string basing on your own criteria