2014-01-28 24 views
0

我有一個UItableView用戶選擇第一行,我的indexPath顯示(0 - 0),我嘗試將我的int到indexPath.row但是,當我嘗試這樣做時,我登錄它使用po myintname它返回到控制檯。如何在xcode調試器中打印出int值?

這就是我的代碼的樣子。

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

    selectedItemIndexPathRow = tempIndexPathRow; 

} 

任何幫助將不勝感激。

回答

2

po需要一個對象(打印對象)。如果您需要基元的值(例如int),則只需將p myintname寫入控制檯。

+0

哎呀..沒關係,所以它返回(int)$ 0 = 0,我猜是我之後。謝謝。 – HurkNburkS

相關問題