in my app I've a plist file of configuration, each viewController, in view开发者_C百科DidLoad load data from it and write.
The problem is: how can I create this plist file in Documents folder on first startup of application? I think to do this in viewDidLoad of first ViewController of the app, but maybe is there a better way?
Why not do it in the UIApplication
delegate message - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
? In there, check to see if the file exists in the Documents directory. If it doesn't, create it.
精彩评论