Search code examples
cocoaxcode4

How to get correct number of buttons in a matrix?


Xcode 4.6. I need to put 5 radio buttons in 2 columns, 3 in the first column and two in the second. I don't have enough real estate to put them in one column. If i select 2 columns, I get an even number of buttons. I'm sure I'm missing something really simple.


Solution

  • You don't show how you populate your cells, but you just need to add a blank cell in the last position:

    NSCell *blankCell = [[NSCell alloc] init];
    blankCell.enabled = NO;
    [_matrixView putCell:blankCell atRow:row column:column];