开发者

Radio Group and Shared user Default bind

开发者 https://www.devze.com 2023-03-26 23:59 出处:网络
I have a preference panel with a radio group of 3 value, the selected index of this group is bind to shared User Default with:

I have a preference panel with a radio group of 3 value, the selected index of this group is bind to shared User Default with:

Control key: values

Model key Path: myoption

If i launch my app with these bind settings it crash, i must specify:

Value Transformer NSUnarchiveFromData

This way launching from defaults read com.mapp.identifier i get a NSData description for "myoption" value.

Here my doubt:

Why i need to use NSArchive开发者_如何学JAVA for selected index value ? i was pretty sure it's managed as an integer! But here i found that i have to store it as NSData.


I usually bind to selected tag instead, manually setting tag values for the individual cells in the matrix that match either the indexes themselves or more significant values of my model.

0

精彩评论

暂无评论...
验证码 换一张
取 消