ios - UItableViewCell ImageView 在选择时更改

标签 ios uitableview uiimageview

我正在加载一个使用网络缓存的 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/

相关文章:

javascript - iOS Safari 无法通过 AJAX 发送表单数据

ios - 核心数据默认条目的设计模式

ios - 键盘隐藏 UITextView swift 2

ios - 如何将特定 View 添加到uitableviewcell?

ios - 在 Swift 中使用 UITableViewCell 时出现问题

ios - 从这段代码返回 UIImageView 吗?

objective-c - 所有UI前面的透明UIImageView

ios - 使 UILabel 出现在故事​​板中的 UIImageView 之上

ios - 在 NSMutableDictionary 中修改 NSMutableArray 的有效方法

ios - 在没有开发者帐户的情况下使用 iOS 模拟器尝试 HealthKit