Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UItableViewCell imageview changing on select

I am loading in a list of facebook users using webcache and it works fantastically. Until you select one of the cells then it seems to either change the content mode, or more likely it changes the size of the uiimageview frame, but based on the actual size of the picture. for clarity here are some screens

here it is loaded http://img.photobucket.com/albums/v246/homojedi/Screenshot20120727114807.png

and on selection of some of the images as you can see they seem to jump to their original aspect. http://img.photobucket.com/albums/v246/homojedi/Screenshot20120727114827.png

as expected if i scroll them off screen and back to them they restore to what they were at the start.

It's baffling. The only thing i have not attempted is subclassing the uitableView and setting its layout subview there. short of that is there anything else i can do?

EDIT: code requested

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    // typically you need know which item the user has selected.
    // this method allows you to keep track of the selection
    _indexPath = indexPath;

    [_indexPath retain];
}
like image 532
Genhain Avatar asked Jul 27 '12 04:07

Genhain


1 Answers

I've face exactly the same issue as you,and I fix

the issue is cause by you named your imageView "imageView"

i don't know why

if you change your imageView name like "m_imageView"

the issue fixed

It's all about naming!

like image 185
Bird Hsuie Avatar answered Sep 22 '22 16:09

Bird Hsuie