简体   繁体   English

iOS 8上的UITableView背景黑色和空白单元格为黑色

[英]UITableView background black and empty cells black on iOS 8

Xcode 7.0b3 iOS Deployment Target 8.0 Xcode 7.0b3 iOS部署目标8.0

Here's the test app I made to isolate the issue. 这是我用来隔离问题的测试应用。

Created a UITableViewController in a UINavigationController . UINavigationController创建了UITableViewController Tap a cell, and pushes another one of those table view controllers. 点击一个单元格,然后按下其中一个表格视图控制器。 This table view controller has a random number of sections and rows in each section. 该表视图控制器具有随机数的节和每个节中的行。

On iPhone running iOS 9, table scrolls correctly... empty cells are while. 在运行iOS 9的iPhone上,表格可以正确滚动...空单元格处于等待状态。 On iPhone running iOS 8, table has black background. 在运行iOS 8的iPhone上,表格的背景为黑色。 Empty rows are black instead of white. 空行是黑色而不是白色。

In our "real" app, we sometimes see contents of old UITableView in a new UITableView. 在我们的“真实”应用程序中,有时我们会在新的UITableView中看到旧的UITableView的内容。 So I tried to isolate the issue to see if its a bug building with the Xcode 7 beta. 因此,我试图找出问题所在,以查看它是否是Xcode 7 Beta的错误构建。

Does this sound like a bug building with the beta xcode and using iOS 8? 这听起来像是使用beta xcode并使用iOS 8构建错误吗? Or did we create a bug/doing something wrong? 还是我们创建了一个错误/做错了什么?

I had the same issue in Xcode 7 beta 3. Temporary workaround was to set tableView.backgroundColor = UIColor.whiteColor() . 我在Xcode 7 beta 3中遇到了同样的问题。临时的解决方法是设置tableView.backgroundColor = UIColor.whiteColor()

As of Xcode 7 beta 4 issue seems to be fixed. 从Xcode 7 beta 4开始,问题似乎已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM