Get Selected index of UITableView
Solution 1:
NSIndexPath *selectedIndexPath = [tableView indexPathForSelectedRow];
Solution 2:
Get current selected row. May be helpful if you have only one section.
- (NSUInteger)currentSellectedRowIndex
{
NSIndexPath *selectedIndexPath = [self.tableView indexPathForSelectedRow];
if (selectedIndexPath) {
return selectedIndexPath.row;
}
else {
return NSNotFound;
}
}