2012-04-16 52 views

回答

1

中只需添加一個標籤等於行的每一個單元格按鈕,button.tag = indexPath.row; 然後你的按鈕的selector你只需要調用

[self tableView:self.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:button.tag inSection:0]]; 
+0

我忘了提,一切都通過綁定掛鉤。我猜你的意思是在tableView中設置按鈕標籤:rowForView :.我會嘗試子類化tableRowView並在那裏設置它。 – 2012-04-16 23:17:25

+0

你必須在tableView:cellForRowAtIndexPath中做到這一點: – 2012-04-17 05:29:05

相關問題