0

我是开发新手。我正在iPhone使用:IASKAPP

Under root.plist, added new preference i.e, "new_preference" BOOL Key with type as PSToggleSwitchSpecifier, default value as NO. I'm able to access "new_preference" default value correctly (as FALSE) on my code using boolForKey:@"new_preference".

当我改变时:

"new_preference" to STRING / INTEGER Key with type as PSTextFieldSpecifier / 

PSMultiValueSpecifier, default value as "abcd" / "123". "new_preference" default value not reflects on my code with string/integerForKey:@"new_preference".

它不是默认值,而是适当地导致“null”/“0”。

4

1 回答 1

0

InAppSettingsKit 不会更改设置键的值,除非用户主动更改。如果密钥尚不存在,则将默认值视为显示的设置。由于您之前已经使用 BOOL 值设置了密钥,因此不会更改。

如果您要更改键的类型,则将旧类型转换为新类型是您的工作。

于 2014-02-13T10:13:55.940 回答