title: Change Collection View Cell background with navigation bar button Swift
body: <p>I hope someone can help you on this coding issue. I want to change my collection view cell background color with a navigation bar button and this is my bar button selector code: </p>
  
  <pre><code>func handleBrightnessChanged() {
     let readingCell = ReadingsDisplayCell()
     readingCell.backgroundColor = .red
  }
  </code></pre>
  
  <p>However, the button doesn't do anything when I click on it. Can you please help me? Below is my UICollectionViewCell class: </p>
  
  <pre><code>class ReadingsDisplayCell: UICollectionViewCell {
  
      override init(frame: CGRect) {
          super.init(frame: frame)
          backgroundColor = UIColor.gray
      }
  
      required init?(coder aDecoder: NSCoder) {
          fatalError("fatal error in Daily cell")
      }
  
  }
  </code></pre>
  
  <p>Thank you very much.</p>