I tried to fetch row id of an item with the help of "didSelectRowAtIndexPath" in iOS. Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
indexPathRow=indexPath.row;
self.recordIdToEdit = [[[deviceNameArray objectAtIndex:indexPath.row] objectAtIndex:0] intValue];
NSLog(@"Item selected..%d", self.recordIdToEdit);
[self performSegueWithIdentifier:@"DetailsViewController" sender:nil];
}
While debugging i get following error for po :
(lldb) po [deviceNameArray objectAtIndex:indexPath.row]
error: property 'row' not found on object of type 'NSIndexPath *'
error: 1 errors parsing expression
(lldb) po indexPathRow
<nil>
What's going wrong here? deviceNameArray is an array of string that contains result fetched from sqlite db.
Try this while debugging we need to send int value