我想创建一个与 IOS 中相同的可滑动表格 View 。但我找不到任何与此相关的文件。我还浏览了 NSTableView 文档并资助了以下项目。
/* View Based TableView: rowActionsVisible can be queried to determine if the "row actions" (see: tableView:rowActionsForRow:edge:) are visible or not. Set rowActionsVisible=NO to hide the row actions. Setting rowActionsVisible=YES is currently not supported and will throw an exception. This property is not encoded in the nib.
*/
@property BOOL rowActionsVisible NS_AVAILABLE_MAC(10_11);
在评论的末尾,它说当前不支持设置 rowActionsVisible=YES,并且会抛出异常。
那么,我们将如何设置操作?
任何线索将不胜感激。
最佳答案
因此,MacOS 10.11 中添加了新的可滑动表格功能,看起来实现该功能的方法是通过实现 NSTableViewDelegate 方法:
您可以在哪里设置NSTableViewRowAction objects via a relatively straightforward init method .
关于macos - 在 NSTableView OS X 中显示 rowActions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34897467/