iam building an application in which iam showing the 5 small images in a single row of the UITable view cell. i want to make selection of row on each image clicked not on the selection of row .
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 160;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"simpsons"];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"simpsons"] autorelease];
}
//cell.textLabel.text = [theSimpsons objectAtIndex:indexPath.row];
//NSString *imageName = [NSString stringWithFormat:@"%d.png", indexPath.row];
//cell.imageView.image = [UIImage imageNamed:imageName];
image1= [[UIImageView alloc] initWithFrame:CGRectMake(5.0,10.0,78, 74)];
[cell.contentView addSubview:image1];
image1.image = [UIImage imageNamed:@"0.png"];
image2= [[UIImageView alloc] initWithFrame:CGRectMake(80.0,10.0,78, 74)];
[cell.contentView addSubview:image2];
image2.image = [UIImage imageNamed:@"1.png"];
image3= [[UIImageView alloc] initWithFrame:CGRectMake(170.0,10.0,78, 74)];
[cell.contentView addSubview:image3];
image3.image = [UIImage imageNamed:@"2.png"];
image4= [[UIImageView alloc] initWithFrame:CGRectMake(240.0,10.0,78, 74)];
[cell.contentView addSubview:image4];
image4.image = [UIImage imageNamed:@"3.png"];
return cell;
}
i want on each image selection only a new row will we opened not on row click ?????