Question

I have a UItableView where the user is selecting the first row, my indexPath is showing ( 0 - 0) and I try to se my int to indexPath.row. However when I try to do this when I log it using po myintname it returns <nil> to the console.

This is what my code looks like.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSLog(@"%@", indexPath);
    int tempIndexPathRow = indexPath.row;

    selectedItemIndexPathRow = tempIndexPathRow;

}
Était-ce utile?

La solution

The po expects an object (print object). If you need the value of a primitive such as an int, write only p myintname to the console.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top