-1
,我们可以很容易地从indexPath中的UITableViewCell这样的:如何通过indexPath.row获取uitableViewCell或者仅获取行号而不是indexpath?
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
而我有的只是行号而不是索引路径,我使用此代码来获取细胞。
NSArray *visible = [self.tableView indexPathsForVisibleRows];
NSIndexPath *indexpath = (NSIndexPath*)[visible objectAtIndex:MyRowNumber];
UITableViewCell *tablecell = [self.tableView cellForRowAtIndexPath:indexpath];
请告诉我,它是否是一个好评,哪怕不是哪一个。
看到这个链接,可以帮助您http://stackoverflow.com/questions/31649220/detect-button-click-in-table-view-ios-xcode-for-multiple-row-and-section/31649321#31649321 –