开发者

Change application settings through settings bundle while application is running IOS

I have written code in -(void)applicationWillEnterForeground:(UIApplication *)application , but my application is not detecting the change made in the settings bundle, new settings work when application restart开发者_开发问答s, someone please help me how to make changes in application's settings while application is running


Try to -(BOOL)synchronize; the NSUserDefaults.


After setting the values in NSUserDefaults try calling [[NSUserDefaults standardUserDefaults] synchronize]; so that the values get written to disk.


in your applicationWillEnterForeground: methode after this line

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults], add this line

[defaults synchronize];

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜