私はNSBrowser
私の窓の1つを持っています。スクリーンショットにあるように、チェックボックス、画像、テキストボックスがあります。
私は2つのことをするのに苦労しています:
- 行選択の色を変更します。デフォルトでは青です。
- チェックボックスでのアクション
チェックボックス + 画像 + テキストボックスは、次のNSBrowserCell
ようにサブクラスに追加されます。
- (instancetype)init
{
self = [super init];
if (self) {
_buttonCell = [[NSButtonCell alloc] init];
[_buttonCell setButtonType:NSButtonTypeSwitch];
[_buttonCell setTarget:self];
[_buttonCell setAction:@selector(cellButtonClick:)];
[_buttonCell setTitle:@""];
_imageCell = [[NSImageCell alloc] init];
_textCell = [[NSTextFieldCell alloc] init];
}
return self;
}
target と Action も追加しましたが、呼び出されません。
これら2つのことをどのように達成できますか?
任意のガイダンスをいただければ幸いです。