Hiding NSTableView header?

后端 未结 4 772
星月不相逢
星月不相逢 2020-12-29 00:46

How do I hide an NSTableView header completely, so that it does not take any space up?

4条回答
  •  无人及你
    2020-12-29 01:51

    To do this programmatically, you can subclass NSTableView (or any NSTableView child class) and return nil for the headerView variable:

    @interface AppTableView : NSTableView {
    
    }
    
    @end
    
    @implementation AppTableView
    
    - (NSTableHeaderView *)headerView{
        return nil;
    }
    
    @end
    

提交回复
热议问题