NSMatrix simple binding question

喜欢而已 提交于 2019-12-12 04:20:59

问题


I am trying a sample application in which I have taken following controls:

i. NSMatrix (with 2 elements, serving as radio button)

ii. Button (which when clicked generates action based on radio button selected)

My questions are-

In IB, can we bind each button cell of NSMatrix to a single bool variable, say- firstElementValue, such that when user selects first button cell in NSMatrix, firstElementValue is YES and when user selects second button cell in NSMatrix, firstElementValue is NO.

or

Is there any other effective way to achieve this ?

Please suggest.

Thanks,

Miraaj


回答1:


I resolved it by setting NSNegateBoolean as value transformer for one of the radio button cells :)



来源:https://stackoverflow.com/questions/6360315/nsmatrix-simple-binding-question

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!