From bcf7916336b2f86f2461229c188ee4896cbf7992 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 22 Aug 2015 16:15:11 -0400 Subject: [PATCH] More uiRadioButtons work. --- redo/reredo/darwin/radiobuttons.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redo/reredo/darwin/radiobuttons.m b/redo/reredo/darwin/radiobuttons.m index 2db320d4..a7842ed8 100644 --- a/redo/reredo/darwin/radiobuttons.m +++ b/redo/reredo/darwin/radiobuttons.m @@ -44,8 +44,9 @@ uiRadioButtons *uiNewRadioButtons(void) prototype:cell numberOfRows:0 numberOfColumns:0]; - // TODO should we allow an initial state of no selection, but not allow the user to select nothing? + // even with this property, none of the radio buttons will be selected initially, which is what we want [r->matrix setAllowsEmptySelection:NO]; + [r->matrix setSelectionByRect:YES]; [r->matrix setIntercellSpacing:NSMakeSize(4, 2)]; [r->matrix setAutorecalculatesCellSize:YES]; [r->matrix setDrawsBackground:NO];