title: How to avoid button tint color change when presenting a popover in iOS?
body: <p>I have a button that show a popover over fullscreen, the main view has a 6 custom views that have 5 button with a tint color in grey or blue, depending of some parameter. but when the popover appears al the button inside the customs view become gray, as soon that popover disappear the custom view get is tint color, I want to avoid that when the popover is presented the button tint conlor does not change.
  the custom view is a view inside a UITableviewCell. the custom view is define as this.</p>
  
  <pre><code> class ratingDoors: UIView {
      var rating: Int = 0{
          didSet{
              makeRating()
          }
      }
  
      @IBOutlet var contentView: UIView!
      @IBOutlet weak var button1: UIButton!
      @IBOutlet weak var button2: UIButton!
      @IBOutlet weak var button3: UIButton!
      @IBOutlet weak var button4: UIButton!
      @IBOutlet weak var button5: UIButton!
  
      override init(frame: CGRect) {
          super.init(frame: frame)
          commonInit()
      }
      required init?(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          commonInit()
          //fatalError("init(coder:) has not been implemented")
      }
      private func commonInit() {
          //TODO: Do some stuff
          // 1. Load the nib
          Bundle.main.loadNibNamed("ratingDoors", owner: self, options: nil)
  
          // 2. Add the 'contentView' to self
          addSubview(contentView)
          contentView.frame = self.bounds
          contentView.autoresizingMask = [.flexibleHeight,.flexibleWidth]
      }
  
      @IBAction func setRating(sender: UIButton){
          rating = sender.tag
          //makeRating()
      }
      func makeRating() {
          button1.configureRatingButton(i: rating)
          button2.configureRatingButton(i: rating)
          button3.configureRatingButton(i: rating)
          button4.configureRatingButton(i: rating)
          button5.configureRatingButton(i: rating)
      }
      }
  
      extension UIButton{
          func configureRatingButton(i: Int){
              if self.tag &lt;= i {
                  self.tintColor = UIColor(red: 90/255, green: 212/255, blue: 227/255, alpha: 1.0)
              }else{
                  self.tintColor = UIColor(red: 204/255, green: 204/255, blue: 204/255, alpha: 1)
              }
          }
      }
  </code></pre>
  
  <p>in the tableview i have this setup for the cell</p>
  
  <pre><code>let cell = tableView.dequeueReusableCell(withIdentifier: "ratingCell") as! ratingTableViewCell
          cell.ratingLabel.text = "Ordenado"
              if let ordered = requestManager.instance.user.ordered{
                  cell.ratingView.rating = ordered
              }
  
          return cell
  </code></pre>
  
  <p>and so for the all 6 rows with the same view.
  here is the prepare(for:) </p>
  
  <pre><code>let popoverVC = segue.destination as! popoverViewController
          popoverVC.delegate = self
          popoverVC.modalPresentationStyle = UIModalPresentationStyle.popover
          popoverVC.popoverPresentationController!.delegate = self
  </code></pre>
  
  <p>the initial configuration for tview is like this.
  <a href="https://i.stack.imgur.com/UqSlZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/UqSlZ.png" alt="initial view state"></a></p>
  
  <p>Here is the view with the popover presented.
  <a href="https://i.stack.imgur.com/8GXIS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8GXIS.png" alt="the buttons in gray collor when popover presented"></a>
  so how avoid the tint color change in the popover presntation?</p>