首先用Xib创建一个新的工程,然后在MainMenu.xib中增加一个NStableView控件,选中tableView,将列设置成1,去掉header,并且删除 Table Column 下面的Table Cell View.
然后创建empty的xib文件命名为CustomDemo.xib,
这样自定义cell就完成了,就可以在NStableView里使用了
' [self.tableView registerNib:[[NSNib alloc] initWithNibNamed:@"CustomDemo" bundle:nil] forIdentifier:@"CustomDemo"]; '
'CustomDemo * view = [tableView makeViewWithIdentifier:@"CustomDemo" owner:self];'