UITableViewCell show white background and cannot be modified on iOS7

后端 未结 14 1342
轻奢々
轻奢々 2020-11-28 18:42

I\'ve implemented a custom table view cell class that inherit from UITableViewCell. The tableview contains a background image, so I want cell\'s background to b

14条回答
  •  温柔的废话
    2020-11-28 18:52

    Swift 1.2 Solution:

    Just add an explicit definition for your cell's background color like so:

    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
    
        // Configure the cell...
        cell.backgroundColor = UIColor.clearColor()
    
        return cell
    }
    

提交回复
热议问题