开发者

Initialization of plist file

开发者 https://www.devze.com 2023-03-02 04:47 出处:网络
in my app I\'ve a plist file of configuration, each viewController, in view开发者_C百科DidLoad load data from it and write.

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.

0

精彩评论

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