我正在加载一个使用网络缓存的 facebook 用户列表,它运行得非常好。在您选择其中一个单元格之前,它似乎要么改变内容模式,要么更可能改变 uiimageview 框架的大小,但基于图片的实际大小。为了清楚起见,这里有一些屏幕
这里加载了 http://img.photobucket.com/albums/v246/homojedi/Screenshot20120727114807.png
在选择一些图像时,您可以看到它们似乎跳到了原来的样子。 http://img.photobucket.com/albums/v246/homojedi/Screenshot20120727114827.png
正如预期的那样,如果我将它们滚动到屏幕外并返回到它们,它们将恢复到开始时的状态。
这令人费解。我唯一没有尝试的是子类化 uitableView 并在那里设置它的布局 subview 。除此之外我还能做些什么吗?
编辑:请求的代码
- (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];
}
最佳答案
我遇到了和你一样的问题,我解决了
问题是由您将 imageView 命名为“imageView”引起的
我不知道为什么
如果您将 imageView 名称更改为“m_imageView”
问题已解决
一切都与命名有关!
关于ios - UItableViewCell ImageView 在选择时更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11681273/