Iphone Uitableview scrolling changing image inside UitableViewCell?

The problem is that whenever you use drawRect for a cell you MUST call setneedsdisplay. That is what fixed my problem.

The issue is that the UITableView reuses cells so that it doesn't need to make more instances than are displayed and you're not explicitly removing the arrow in your configureCell method. If the arrow shouldn't be displayed on a cell, explicitly clear it out in the configureCell method and that should fix it.

Thank you for your answer, I am aware that the viewcells are being reused and I have tried to explicitly clear the cell. ArrowImage property by setting it to nil. However this is not working well.

Even if I set different images for every single cell, once I scroll down and up the images are mixed up. I am setting my images in every cell the same way im setting them in the first one. How should I handle this issue?.

Thank you in advance. -Oscar – Oscar Gomez Dec 3 '09 at 18:55 I have also tried this aproach - (void)configureCell:(TableViewCells *)cell atIndexPath:(NSIndexPath *)indexPath { cell. ArrowImage = UIImage imageNamed:@"arrowDown.

Png"; switch (indexPath. Row) { case 0: { if (indexPath. Section == cotizacionIdeal) { cell.

ArrowImage = UIImage imageNamed:@"arrowUp. Png"; cell. Nombre setText:@"Recursos"; cell.

Cantidad setText:NSString stringWithFormat:@"%1.2f", cotizacionPrevia. SueldoDeRecursos doubleValue; Which works fine until I scroll down and up. – Oscar Gomez Dec 3 '09 at 18:59 I am wondering could this be because I'm using the iphone simulator?

– Oscar Gomez Dec 3 '09 at 19:32.

I am not 100% on this but I think it is to do with the release of the image. When you use imageNamed, the instance is retained so it is suggested to use imageWithFilePath instead. Hope this helps....

ArrowImage = UIImage imageNamed:@"arrowDown. ArrowImage = UIImage imageNamed:@"arrowUp. Cantidad setText:NSString stringWithFormat:@"%1.2f", cotizacionPrevia.

Porcentaje setText:NSString stringWithFormat:@"%1.2f%@", cotizacion.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions