iphone - 更改 UITableviewcell 中附件类型图标的方法

标签 iphone uitableview accessoryview

我有表格 View ,显示要下载的文件列表。当我点击附件按钮时,它将下载所选的文件。我想更改详细信息披露按钮的图像。有可能吗......?

如果我在附件 View 中使用带有图像的按钮。是否有任何表委托(delegate)方法用于此...

最佳答案

答案2:您可以创建自己的方法并在这种情况下调用它。

int row=indexPath.row;

UIButton *trackImageOnMap=[[UIButton alloc] initWithFrame:CGRectMake(420, 9, 40, 50)];
[trackImageOnMap setImage:[UIImage imageNamed:@"track_map_icon.png"] forState:UIControlStateNormal];
int iId=[[self.imageId objectAtIndex:row] intValue];
NSLog(@"iId=%d",iId);
[trackImageOnMap setTag:iId];
[trackImageOnMap addTarget:self action:@selector(trackImageOnMapButtonTouched:)forControlEvents:UIControlEventTouchDown];
[trackImageOnMap setContentMode:UIViewContentModeScaleToFill];
//[cell setAccessoryView:trackImageOnMap];
[cell addSubview:trackImageOnMap];

关于iphone - 更改 UITableviewcell 中附件类型图标的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6197261/

相关文章:

iphone - JSON IPHONE : How to send a JSON request and pull the data from a server?

iphone - 如何在我的 Objective-C 源代码中转义 Unicode 字符?

uitableview - 实现 heightForRowIndexPath : in iOS 7, 但在 iOS 8 中使用编译时宏删除它

ios - 在 cell.accessoryView 中显示 NSString 而不是 UIImageView?

iphone - 使用phonegap和titanium的疑惑

iphone - 推送通知徽章不来

ios - UITableViewCell 内的 UILabel 高度

UITableViewRowAction : Delete

iphone - UIButtonTypeRoundedRect 作为 accessoryView

ios - 是否可以禁用点击自定义 UITableViewCell 的附件 View 部分?