how to change the cell image in uitableview?


i know this is to much silly question but i dont remember how to do this .

i want to make selected image when in table select image.

i want to add image in call and diffrent image in selection.

how can i do this ?

If you want to set the image as selected state when clicks the table view row. Use this code,

CGRect a=CGRectMake(0, 0, 300, 100);

UIImageView *bImg=[[UIImageView alloc] initWithFrame:a];

bImg.image=[UIImage imageNamed:@"YourBackGround.png"]; 

[bImg setContentMode:UIViewContentModeScaleToFill];


[bImg release];