iOS 7/8中的UITableViewCell左侧有差距

时间:2014-07-05 04:53:29

标签: ios uitableview insets

自从我升级到iOS 7后,UITableViewCell上的图像左侧有一个间隙。对iOS 8 beta来说似乎是一样的。

在这里阅读了很多答案后,我试过了:

  • 将IB中的自定义单独插入设置为0
  • set tableView.SeparatorInset = UIEdgeInsets.Zero;

只有自定义表格单元格才有效...但我的代码在iOS 8中断了(现在一切都搞乱了,图像与文本重叠)。

UIImageView *imageView = [[UIImageView alloc]initWithFrame:IS_IPAD ? CGRectMake(0, 0, 137, 103) : CGRectMake(0, 0, 100, 74)];
imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"song%d.png", row + 1]];
[cell.contentView addSubview:imageView];

不管有人有解决方案吗?

0 个答案:

没有答案