我想创建一个与iOS中相同的可滑动查看的表格视图。但我找不到与此有关的任何文件。另外,我正在阅读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);
评论的末尾说,Setting rowActionsVisible=YES is currently not supported and will throw an exception.
那么,我们将如何设置动作?任何线索将不胜感激。
因此,MacOS 10.11中增加了新的Swipeable表功能,并且看起来该方法是通过实现NSTableViewDelegate方法实现的:
您可以在其中通过相对简单的init方法设置NSTableViewRowAction对象。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句