首先先创建一个Settings.bundle文件,在Root.plist文件编辑信息,
首先Application Preferences一共有
[b]1.PSTextFieldSpecifier
2.PSTitleValueSpecifier
3.PSToggleSwitchSpecifier
4。PSSliderSpecifier
5.PSMultiValueSpecifier
6.PSGroupSpecifier
7.PSChildPaneSpecifier [/b]7个条目,分别代表不同的视图!
键(key) 值类型(type) 值(value)
[color=red]1. PSTextFieldSpecifier[/color]
IsSecure Boolean YES/NO
KeyboardType String ( Value: Value must contain one of the following strings. Alphabet, NumbersAndPunctuation, NumberPad, URL and EmailAddress.)
AutocapitalizationType String (Value: Value must contain one of the following strings. None, Sentences, Words, AllCharacters. Default value is None.)
AutoCorrectionType String (Value: Value must contain one of the following strings. Default, No, Yes. Default value is Default.)
下同:
[color=red]2.PSTitleValueSpecifier[/color]
Key: Type (required)
Type: String
Value: PSTitleValueSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: Key (required)
Type: String
Value: Your string value.
Key: DefaultValue (required)
Type: String
Value: Your string value.
Key: Values
Type: Array
Value: Key-Value entry
Key: Titles
Type: Array
Value: Key-Value entry
[color=red]3.PSToggleSwitchSpecifier[/color]
Key: Type (required)
Type: String
Value: PSToogleSwitchSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: Key (required)
Type: String
Value: Your string value.
Key: DefaultValue (required)
Type: String
Value: Your string value.
Key: TrueValue
Type: Boolean
Value: YES
Key: FalseValue
Type: Boolean
Value: NO
[color=red]4.PSSliderSpecifier[/color]
Key: Type (required)
Type: String
Value: PSSliderSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: Key (required)
Type: String
Value: Your string value.
Key: DefaultValue (required)
Type: String
Value: Your string value.
Key: MinimumValue (required)
Type: Number
Value: Minimum number value here
Key: MaximumValue (required)
Type: Number
Value: Maximum number value here
Key: MinimumValueImage
Type: String
Value: Image (21*21)
Key: MaximumValueImage
Type: String
Value: Image (21*21)
[color=red]5.PSMultiValueSpecifier[/color]
Key: Type (required)
Type: String
Value: PSMultiValueSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: Key (required)
Type: String
Value: Your string value.
Key: DefaultValue (required)
Type: String
Value: Your string value.
Key: Values
Type: Array
Value: Key-Value entry.
Key: Titles
Type: Array
Value: Key-Value entry.
[color=red]6.PSGroupSpecifier[/color]
Key: Type (required)
Type: String
Value: PSGroupSpecifier
Key: Title (required)
Type: String
Value: Your string value.
[color=red]7.PSChildPaneSpecifier[/color]
Key: Type (Required)
Type: String
Value: PSChildPaneSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: File
Type: String
Value: The name of plist file, without the extension.
最后在程序中根据key得到用户设置的value
NSstring default = [[NSUserDefaults standardUserDefaults] stringForKey:@”key”];
首先Application Preferences一共有
[b]1.PSTextFieldSpecifier
2.PSTitleValueSpecifier
3.PSToggleSwitchSpecifier
4。PSSliderSpecifier
5.PSMultiValueSpecifier
6.PSGroupSpecifier
7.PSChildPaneSpecifier [/b]7个条目,分别代表不同的视图!
键(key) 值类型(type) 值(value)
[color=red]1. PSTextFieldSpecifier[/color]
IsSecure Boolean YES/NO
KeyboardType String ( Value: Value must contain one of the following strings. Alphabet, NumbersAndPunctuation, NumberPad, URL and EmailAddress.)
AutocapitalizationType String (Value: Value must contain one of the following strings. None, Sentences, Words, AllCharacters. Default value is None.)
AutoCorrectionType String (Value: Value must contain one of the following strings. Default, No, Yes. Default value is Default.)
下同:
[color=red]2.PSTitleValueSpecifier[/color]
Key: Type (required)
Type: String
Value: PSTitleValueSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: Key (required)
Type: String
Value: Your string value.
Key: DefaultValue (required)
Type: String
Value: Your string value.
Key: Values
Type: Array
Value: Key-Value entry
Key: Titles
Type: Array
Value: Key-Value entry
[color=red]3.PSToggleSwitchSpecifier[/color]
Key: Type (required)
Type: String
Value: PSToogleSwitchSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: Key (required)
Type: String
Value: Your string value.
Key: DefaultValue (required)
Type: String
Value: Your string value.
Key: TrueValue
Type: Boolean
Value: YES
Key: FalseValue
Type: Boolean
Value: NO
[color=red]4.PSSliderSpecifier[/color]
Key: Type (required)
Type: String
Value: PSSliderSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: Key (required)
Type: String
Value: Your string value.
Key: DefaultValue (required)
Type: String
Value: Your string value.
Key: MinimumValue (required)
Type: Number
Value: Minimum number value here
Key: MaximumValue (required)
Type: Number
Value: Maximum number value here
Key: MinimumValueImage
Type: String
Value: Image (21*21)
Key: MaximumValueImage
Type: String
Value: Image (21*21)
[color=red]5.PSMultiValueSpecifier[/color]
Key: Type (required)
Type: String
Value: PSMultiValueSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: Key (required)
Type: String
Value: Your string value.
Key: DefaultValue (required)
Type: String
Value: Your string value.
Key: Values
Type: Array
Value: Key-Value entry.
Key: Titles
Type: Array
Value: Key-Value entry.
[color=red]6.PSGroupSpecifier[/color]
Key: Type (required)
Type: String
Value: PSGroupSpecifier
Key: Title (required)
Type: String
Value: Your string value.
[color=red]7.PSChildPaneSpecifier[/color]
Key: Type (Required)
Type: String
Value: PSChildPaneSpecifier
Key: Title (required)
Type: String
Value: Your string value.
Key: File
Type: String
Value: The name of plist file, without the extension.
最后在程序中根据key得到用户设置的value
NSstring default = [[NSUserDefaults standardUserDefaults] stringForKey:@”key”];