indexPathsForVisibleRows を介して NSIndexpaths の配列の intValue を読み取るにはどうすればよいですか?
ところで、if (cell == nil) 関数の前に、visibleCells と indexPathsForVisibleRows が機能しないのはなぜですか?
これが私のコードです:
cellForRowAtIndexPath メソッドでは:
static NSString *identifierString;
UITableViewCell *cell = [tableView1 dequeueReusableCellWithIdentifier:identifierString];
// when I use visibleCells and indexPathsForVisibleRows here, the app crashes
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifierString] autorelease];
cell.accessoryType = UITableViewCellAccessoryNone;
}
// when I use visibleCells and indexPathsForVisibleRows here, the app works
//cell implementation here
return cell;