NSPopover和NSTableView单元格

Ale*_*exT 4 cocoa objective-c

我正在寻找将NSPopover附加到NSTableView的单元格的方法. showRelativeToRect:(NSRect)positioningRect ofView:(NSView *)positioningView preferredEdge:(NSRectEdge)preferredEdge; 我如何找到positioningRectpositioningView细胞的问题?

Ale*_*exT 16

答案很简单:[tableview frameOfCellAtColumn:0 row:[tableview selectedRow]];用于positioningRecttableviewpositioningView