Hiding UITableView delimiter behind content

I made a grouped UITableView on iPhone OS 3.0 that looked like a left image. The result is the correct image in OS 3.1.

Capturedcran2009-09-15205242-1.png

ImageView is under the delimiters.

I tried to put the content view forward. The separatorStyle priority seems ignored when the tableView is in a grouped style (for drawing a separator). Changing the color of the separator gives the results of the rows.

Thank you for your help!

Edit: this is the code unchanged:

static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    cell.textLabel.font = [UIFont boldSystemFontOfSize:18.0];
}

cell.textLabel.text = [[metro.arretDirection objectAtIndex:indexPath.row] name];

NSString* name;
if (indexPath.row == 0) {
    name = @"Begining";
}
else if (indexPath.row + 1 == [metro.arretDirection count]) {
    name = @"End";
}
else {
    if ([[[metro.arretDirection objectAtIndex:indexPath.row] lines] count]== 1) name = @"Little";
    else name = @"Big";
}

UIImage* metroImage = [[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[NSString stringWithFormat:@"%i%@.png", metro.metroNumber, name]]];
cell.imageView.image = metroImage;
[metroImage release];

return cell;
+3
source share
2 answers

, , imageView.

+1

clipsToBounds . cell.clipsToBounds = NO;

+1

Source: https://habr.com/ru/post/1717784/


All Articles