UITableViewCell 在运行时看起来与在 InterfaceBuilder 中不同(iPad)

UITableViewCell looks different at runtime than in InterfaceBuilder (on iPad)

我正在 swift 开发通用应用程序。基础是 SplitViewController。 tableview 嵌入在 SplitViewController 的详细视图中。我的 UITableViewCells 的背景颜色看起来与预期不同 - 但仅在 iPad 上。我尝试了以下设置:

故事板中的 TableView:

视图层次结构:

单元格设置:

内容视图的设置:

这是我的 "cellForRowAtIndexPath" 代码:

 let tableData = ["Test User 1", Test User 2"]

 func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

         var cell = tableView.dequeueReusableCellWithIdentifier("cell") as! UITableViewCell!

         cell.textLabel!.text  = tableData[indexPath.row]
         cell.textLabel?.textColor = UIColor.whiteColor()
         cell.textLabel?.font = UIFont(name: "HelveticaNeue-Light", size: 

         return cell
     }

并且 tableview 在模拟器中看起来像这样:

如前所述 - 如果我 select 一个 iPhone 设备作为模拟器,它看起来是正确的。这是来自 iPhone 模拟器的图片:

我不知道为什么它在 iPad 上是白色而不是 InterfaceBuilder 中定义的深灰色(就像在 iPhone 上一样)?没有什么是"selected".....我一直用any/any作为尺寸class。我在这里奋斗了几天

我很高兴得到每一个提示。

提前致谢。 丹尼尔

请注意,即使在 Xcode7、

中,Storyboard 中通常(仍然)存在 错误

您必须在代码中设置单元格的背景颜色,它在故事板中不起作用

class YourCell:UITableViewCell
    {
    override func awakeFromNib()
        {
        super.awakeFromNib()
        self.backgroundColor = UIColor.clearColor()
        }

    }

您可能还有另一个问题,但这是一个问题。