专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Iphone

iphone跟ipad设置束的运用

发布时间:2010-05-30 01:12:34 文章来源:www.iduyao.cn 采编人员:星星草
iphone和ipad设置束的运用!
首先先创建一个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”];
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: