iPhone reading shared settings from a file
For my universal application, I want to keep some settings shared by diferent controllers out of my code, like font names, colors, row height information. What is the best wa开发者_JAVA百科y to do that in IOS? plist,a separete xml file, a txt file?
Tnx
You could create som kind on settings class which you can easily write to a plist file using NSCoding.
If you make this class a singleton you then don't need to load the plist file in all the controllers. Use the create SynthesizeSingleton.h from cocoawithlove.
plist file. And, also have the settings class as singleton class.
精彩评论