I want to assign the value of indexpath.row of th开发者_如何学Goe row which is currently selected, to a variable, How to do that???
Where (in what method) are you doing this?
This is pretty typical in my table view controllers for table views that only have one section:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
int row = indexPath.row;
// code using "row" here
}
精彩评论