我有静态表,我设置了背景颜色tableview -> tableView.backgroundColor = UIColor.redColor(),当我有等时。静态表中有 3 行然后是 tableview 颜色,3 行是白色如何修复此单元格的背景颜色?此代码不适用于静态表 ->
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as! UITableViewCell
cell.textLabel!.text = numbers[indexPath.row]
cell.backgroundColor = UIColor.greenColor()
return cell
}
Run Code Online (Sandbox Code Playgroud)