title: How to change the color of text in a tableview swift?
body: <p>I've created a tableview in swift and I'm customising appearance to make it look nicer. I'd like to change the appearance to have a clear background and white text color. Tableview function:</p>
  
  <pre><code>  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      let cell:UITableViewCell = self.myTableView
          .dequeueReusableCellWithIdentifier("cell")! as UITableViewCell
      let score = scores[indexPath.row]
      cell.textLabel!.text = String(score.gameScore!)
      UITableViewCell.appearance().textLabel?.textColor = UIColor.whiteColor();
      UITableViewCell.appearance().backgroundColor = UIColor.clearColor();
  
      return cell;
  }
  </code></pre>
  
  <p>So the second part works with the clear cells but but the first part doesn't for some reason. I checked out some sources online but can't seem to get this one right:</p>
  
  <p><a href="https://stackoverflow.com/questions/30524387/how-to-change-text-color-in-tableview-section-in-swift">How to change text color in tableView section in swift</a></p>
  
  <p><a href="https://www.natashatherobot.com/ios-change-uitableviewcell-selection-color-app-wide/" rel="noreferrer">https://www.natashatherobot.com/ios-change-uitableviewcell-selection-color-app-wide/</a></p>
  
  <p>Any help would be greatly appreciated! Thanks</p>