开发者

NSMatrix simple binding question

开发者 https://www.devze.com 2023-03-13 00:35 出处:网络
I am trying a sample application in which I have taken following controls: i.NSMatrix (with 2 elements, serving as radio button)

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 othe开发者_StackOverflow中文版r effective way to achieve this ?

Please suggest.

Thanks,

Miraaj


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

0

精彩评论

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

关注公众号