UItableViewCell imageview在选择时更改 [英] UItableViewCell imageview changing on select

查看:308
本文介绍了UItableViewCell imageview在选择时更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用webcache加载一个facebook用户列表,它的工作非常棒。在您选择其中一个单元格之前,它似乎要么更改内容模式,要么更可能更改uiimageview框架的大小,而是根据图片的实际大小。为清楚起见,这里有一些屏幕

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

这里加载
http://img.photobucket.com/albums/v246/homojedi/Screenshot20120727114807.png

等等选择一些图像,你可以看到他们似乎跳到他们原来的方面。
http://img.photobucket.com/albums/v246/homojedi /Screenshot20120727114827.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.

令人费解。我唯一没有尝试的是子类化uitableView并在那里设置其布局子视图。除此之外我还能做些什么吗?

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?

编辑:请求的代码

- (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];
}


推荐答案

我完全面对和你一样的问题,我修好了

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

这个问题是因为你将你的imageView命名为imageView

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

我不知道为什么

如果你改变你的imageView名称,如m_imageView

if you change your imageView name like "m_imageView"

问题已修复

关于命名的全部内容!

这篇关于UItableViewCell imageview在选择时更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆