Как известно, для заполнения содержимого ячеек необходимо использовать метод делегата:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
Итак, вы должны поместить свой IF внутри этого метода и использовать indexPath.row, чтобы понять строку, которую вы рисуете.
Вот простой пример:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"] autorelease];
}
UIImage *a,*b; //Remeber to init with your images:)
if(indexPath.row == 1)
{
[cell.imageView setImage:a];
}
else
{
[cell.imageView setImage:b];
}
return cell;
}
Надеюсь, это то, что вы искали:)