Get button's row in view based table

后端 未结 5 1659
情深已故
情深已故 2020-12-17 20:34

How do you get the row for a button in a view based table when you click the button? The row is not selected when the button is clicked, but I found that if you log sender.s

5条回答
  •  情话喂你
    2020-12-17 20:36

    -[NSTableView rowForView:] says this in its documentation:

    This is typically needed in the action method for an NSButton (or NSControl) to find out what row (and column) the action should be performed on.

提交回复
热议问题