最終更新:2013-05-22 (水) 04:26:01 (3984d)  

objectAtIndex
Top / objectAtIndex

Xcode 4.3以前

// 0番目の要素のアクセス
NSDate *date = [dateList objectAtIndex:0];
[dateList replaceObjectAtIndex:0 withObject:now];

Xcode 4.4

// 0番目の要素のアクセス
NSDate *date = dateList[0];
dateList[0] = now;

関連

  • NSMutableArray?
  • replaceObjectAtIndex:withObject?