自定义NSTableView单元格的最简单方法是什么?
问题描述:
我是iOS开发人员.我最近启动了Mac项目,但发现与UITable的子类UITableViewCell不同,NSTableView的单元格为NSCell,甚至无法在IB中创建它.我想知道是否有一些简单的方法可以创建子类,例如NSTextFieldCell并将其放入NSTableView.
I'm an iOS developer. I recently started my Mac project, but I found that unlike UITableViewCell, which is a subclass of UIView, the cell of NSTableView is NSCell, and I even can't create it in IB. I wonder if there are some easy ways to create subclass like NSTextFieldCell to put it into the NSTableView.
任何帮助将不胜感激!谢谢!
Any help would be appreciated! Thanks!
答
看看开源 PXListView Github
Have a look at the open source PXListView class on Github
其中有一个PXListViewCell
,您可以作为示例.
This has a PXListViewCell
that you can use as an example.