0

の表示/非表示ボタンを削除したいのでNSOutlineView、をオーバーライドしてイベントNSOutlineViewを取得しmouseDownます。コードは次のとおりです。

    -(void)mouseDown:(NSEvent *)theEvent
{
    NSLog(@"LeftFolderListOutlineView mouseDown");
    [super mouseDown:theEvent];

    NSPoint localPoint = [self convertPoint:theEvent.locationInWindow
                                   fromView:nil];
    NSInteger row = [self rowAtPoint:localPoint];

    id clickedItem = [self itemAtRow:row];

    if (![clickedItem isKindOfClass:[NSDictionary class]]) {
        return;
    }


    if ([self isItemExpanded:clickedItem]) {

        [[self animator] collapseItem:clickedItem];

    }else{
        [[self animator] expandItem:clickedItem];
    }

}

NSOutlineView が折りたたまれたり展開されたりするとスクロール アニメーションになるはずですが、この場合は機能していません。

4

1 に答える 1