1

I am trying several solution like this to make my UITableView transparent

    func tableView(tableView: UITableView, cellForRowAtIndexPath        indexPath: NSIndexPath) -> UITableViewCell {
      tableView.backgroundColor=UIColor.clearColor()
    let cell = tableView.dequeueReusableCellWithIdentifier("signCell", forIndexPath: indexPath) as! SignUpTableViewCell


    cell.backgroundColor=UIColor.clearColor()
    cell.signInfo.text="Mee"

   return cell
}

and I make my text transparent also, but the table and text after that disappear .

Sam
  • 243
  • 3
  • 12

2 Answers2

2

Try this code in ViewDidLoad

_tableView.backgroundColor = UIColor.clearColor()
Pritesh Raiyani
  • 303
  • 1
  • 7
0

In some situations, setting tableView.backgroundColor doesn't work and the background of the tableView is always white. I came across this issue when using a UITableView within a custom UIView and solved it with this:

public func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {        
    tableView.backgroundColor = UIColor.clear
}
Genesis
  • 8,038
  • 3
  • 21
  • 22