Subclass NSTableRowView for NSOutlineView

女生的网名这么多〃 提交于 2020-01-02 05:31:15

问题


If you have a tableView and want to use a subclass of NSTableRowView, you can use the delegate function - (NSTableRowView *)tableView:(NSTableView *)tableView rowViewForRow:(NSInteger)row. Any ideas of how I can do this with an NSOutlineView (without subclassing NSOutlineView)?


回答1:


The NSOutlineView has this delegate method:

  • (NSTableRowView *)outlineView:(NSOutlineView *)outlineView rowViewForItem:(id)item

that serves the same purpose for an outline view. I don't see this method in my docs in Xcode, but it's declared in NSOutlineView.h in MacOSX10.7.sdk



来源:https://stackoverflow.com/questions/10771144/subclass-nstablerowview-for-nsoutlineview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!