If I use Button and images in the attachment view. Is there any table delegation method…
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];
I have a table view that shows a list of files to download. When I click the attachment button, it will download the selected file. I want to change the image of the detail disclosure button. Is it possible…?
If I use Button and images in the attachment view. Is there any table delegation method…
Answer 2: You You can make your own method and call it in that situation.
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];