UITableViewCells周围的黑角 [英] Black corners around UITableViewCells

查看:54
本文介绍了UITableViewCells周围的黑角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在图像前面显示UITableView,这是我要执行的步骤:

I am trying to display a UITableView in front of an image, and here's the steps I'm following:

  • 在视图内部,将设置了图像的UIImageView添加到项目中的相应文件中
  • 在父视图(与图像视图相同的父视图)内添加一个UITableView
  • 设置要清除的表格视图的backgroundColor
  • 在视图控制器中连接数据源以显示一些测试数据
  • 在IB中查找数据源.

完成此操作后,tableviewcell的角处为黑色背景.据我所知,它并非来自任何父视图.我在 bitbucket 上有一个测试项目,该项目演示了此问题.

After doing this, the tableviewcells have a black background in the corners. It isn't coming from any of the parent views as far as I can tell. I have a test project at bitbucket which demonstrates the issue.

推荐答案

Jeff Lamarche今天遇到了完全相同的问题,并撰写了有关该问题的博客文章: http://iphonedevelopment.blogspot.com/2010/08/transparent-grouped-tableviews.html

Jeff Lamarche ran into the exact same issue today and put up a blog post about it: http://iphonedevelopment.blogspot.com/2010/08/transparent-grouped-tableviews.html

基本上,似乎存在一些错误,您仍然需要在代码中添加此错误(即使您已经在Interface Builder中将tableView设置为清除):

Basically, there appears to be some bug where you still need to add this in code (even though you already have the tableView set to be clear in Interface Builder):

self.tableView.backgroundColor = [UIColor clearColor];

这篇关于UITableViewCells周围的黑角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆