1 つの機能で 2 セットの同一のボタンを更新できるようにしたいと考えています。また、すべてのボタンを更新するのではなく、一部のみを更新します。
このような関数を使用できますか?:
-(void) updateFields{
updateButton1 : (Bool) x
updateButton2 : (Bool) y
updateButton3 : (Bool) z }
実装は次のようになります。
[button1_1 setEnabled:x];
[button1_2 setEnabled:x]; //called only if updateButton1 is given an argument
[button2_1 setEnabled:y];
etc...