【发布时间】:2011-09-08 11:10:29
【问题描述】:
我的表格视图在非编辑模式下看起来...
在编辑模式中...
我想在编辑模式下的部门名称字段中显示列表图像。它应该在非编辑模式下隐藏。
我在tableView: cellForRowAtIndexPath:..中使用以下代码添加了这张图片。
if (isInEditMode) {
UIImageView *listingImage = [ [UIImageView alloc] initWithFrame:CGRectMake(275, 16, 13, 13)];
listingImage.image = [UIImage imageNamed:@"listing.png"];
[cell.contentView addSubview:listingImage];
[listingImage release];
}
else {
//Need to remove image from cell
}
更新isInEditMode布尔值相对于右栏按钮(编辑按钮)的点击。
如何在非编辑模式下删除图像?
提前致谢
【问题讨论】:
标签: iphone uitableview uiimageview