iphone和ipad设置束的运用!(Settings.bundle)

首先先创建一个Settings.bundle文件,在Root.plist文件编辑信息, 
首先Application Preferences一共有 
1.PSTextFieldSpecifier 
2.PSTitleValueSpecifier 
3.PSToggleSwitchSpecifier 
4。PSSliderSpecifier 
5.PSMultiValueSpecifier 
6.PSGroupSpecifier 
7.PSChildPaneSpecifier 
7个条目,分别代表不同的视图! 

键(key)                            值类型(type)                     值(value) 
1. PSTextFieldSpecifier 
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.) 
下同: 
2.PSTitleValueSpecifier 

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 



3.PSToggleSwitchSpecifier 

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 

4.PSSliderSpecifier 

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) 

5.PSMultiValueSpecifier 

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. 

6.PSGroupSpecifier 

Key: Type (required) 
Type: String 
Value: PSGroupSpecifier 

Key: Title (required) 
Type: String 
Value: Your string value. 

7.PSChildPaneSpecifier 

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”]; 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值