문제

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;

}
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top