如果我有一個索引路徑,其值爲{0,0}。將其更改爲{0,1}的正確方法是什麼?我知道,如果它是一個普通的C數組這純粹是:更改NSIndexPath對象的值
unsigned i_array[] = { 0, 0};
i_array[1] = 1;
但從NSIndexPath的文檔,我可以得到最接近的是:
– indexPathByRemovingLastIndex
– indexPathByAddingIndex:
這似乎有點麻煩。有沒有一種方法可以覆蓋索引數組的最後一個成員?
嘗試像'indexPath = [NSIndexPath indexPathForRow:indexPath.row切入口:indexPath.section + 1];'。 – 2012-02-04 09:17:16
感謝您的評論和善意的幫助。 – Stanley 2012-02-04 09:32:02