我是新手。我对 NSMatrix 有疑问。我创建了多个 NSMatrix 但我想先加载,他们没有检查。我使用此代码创建它们,但它总是检查。
prototype= [[NSButtonCell alloc] init];
[prototype setTitle:@""];
[prototype setButtonType:NSRadioButton];
NSRect matrixRect = NSMakeRect(400, textfield_Y, 50, 20);
myMatrix = [[NSMatrix alloc] initWithFrame:matrixRect
mode:NSRadioModeMatrix
prototype:(NSCell *)prototype
numberOfRows:1
numberOfColumns:1];
[myMatrix setTag:300+i];
//[myMatrix setAction:@selector(radioButtonClicked:)];
[myMatrix setTarget:self];
NSArray *cellArray = [myMatrix cells];
[[cellArray objectAtIndex:0] setTag:0];
[guiView addSubview:myMatrix];
[prototype release];
[myMatrix release];
有任何想法吗?非常感谢