Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ラジオ ボタン (マトリックス) のグループがあり、4 つの選択肢があります。選択内容を (プログラムで) 調べて、その BOOL を取得するにはどうすればよいですか?
ラジオ ボタンのマトリックスに名前が付けられmatrix、タイプが であると仮定すると、次のように、NSMatrix のメソッドをNSMatrix *介して選択された NSButton を見つけ、NSButton のselectedCellメソッドを介してボタンの状態にアクセスしますstate。
matrix
NSMatrix *
selectedCell
state
BOOL state = [[matrix selectedCell] state];