简体   繁体   English

将默认值添加到settings.bundle项目?

[英]Adding default values to settings.bundle items?

I have noticed that some values in settings.bundle (Root.plist) do not allow you to associate a default value with them? 我注意到settings.bundle(Root.plist)中的某些值不允许您将默认值与它们相关联?

在此输入图像描述

Is there a way to add a default field or is it simply a case of adding the appropriate defaults for these items inside the application using ... 有没有办法添加默认字段,或者只是在应用程序内使用这些项添加适当的默认值的情况...

NSDictionary *defaultSettings = [NSDictionary dictionaryWithObjectsAndKeys:@"Kinetic", @"IDBombs", nil];
[userDefaults registerDefaults:defaultSettings];

Just curious if I am doing this right or missing something? 只是好奇我是做对了还是错过了什么?

在项目中的任何行上单击鼠标右键,单击菜单上的“ Add row ”,然后选择“ Default value

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM