为什么我的代码在第一次运行后将选中状态更改NSButtenCell
为NSOnState
?
NSButtonCell *b=[[NSButtonCell alloc] init];
b=[self.myMatrix selectedCell];
[self.myMatrix selectCellAtRow:0 column:0];
if (b.state == NSOnState) {
NSLog(@"State is On");
}else{
NSLog(@"State is Off");
}
我能做些什么 ?