1、通過cell,獲取indexRow
NSInteger row = [self.tableView rowForView:cell];
2、刪除cell時的動畫效果
[self.tableView removeRowsAtIndexes:[NSIndexSet indexSetWithIndex:row] withAnimation:NSTableViewAnimationEffectFade];
3、NStableView布局后左右兩側(cè)會有空白,在xib中TableView的屬性中設置Style為Plain即可去掉
4、窗口放大到一定程度時,tableView的顯示的列表放大到一定程度就無法繼續(xù)放大了,需要點擊column,設置TableColumn的最大值
5、MacOS中的分組列表為OutlineView,默認是有折疊效果,和子列表前面空出一點位置的。去掉折疊效果和間距可以添加代理方法
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldCollapseItem:(id)item{
return NO;
}
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldShowOutlineCellForItem:(id)item{
return NO;
}