views:

21

answers:

0

I'm trying to have a different image for each one of the cells of my tableview. I do this with the following code in the cellforrowatindexpath method:

if (platform = @"Win") {
        UIImage *winImage = [[UIImage imageNamed:@"Vista.png"] retain];
        cell.imageView.image = winImage;
    }else if (platform = @"Mac") {
        UIImage *appleImage = [[UIImage imageNamed:@"Apple.png"] retain];
        cell.imageView.image = appleImage;
    }else if (platform = @"Linux") {
        UIImage *linuxImage = [[UIImage imageNamed:@"Linux.png"] retain];
        cell.imageView.image = linuxImage;
    }else {
        UIImage *unknownImage = [[UIImage imageNamed:@"other.png"] retain];
        cell.imageView.image = unknownImage;

    }

However the winImage is displayed for every cell even when platform is of the other types.

Does anyone know what I'm doing wrong?