Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前,当我从 NSTableView 中拖出一行时,该行中的文本是半透明的。相反,我想显示一个代表这一行的半透明图像。
我怎样才能做到这一点?
我建议覆盖-[NSTableView dragImageForRowsWithIndexes:tableColumns:event:offset:](从 OS X 10.4 开始可用)或(从 OS X 10.7 开始可用,用于新的基于视图的表视图)的draggingImageComponents属性。NSTableCellView
-[NSTableView dragImageForRowsWithIndexes:tableColumns:event:offset:]
draggingImageComponents
NSTableCellView