title: bringSubviewToFront not working with dropdown view (UIView)
body: <p>I have a dropdown view (it'a <code>UIView</code> with a <code>UITableView</code> fully embedded in it). The top anchor is programmatically constrained to the bottom anchor of a <code>UIButton</code> so that when you touch the button, the dropdown view opens. See code below</p>
  
  <p>However, my problem lies in the fact that the height of the open dropdown view is <code>150</code>, and the only part shown of the view is the part inside the <code>UITableViewCell</code> (see image), with the bottom part hidden behind the cell.</p>
  
  <pre><code>func genderDropdownViewConfig() {
      genderDropdownView.backgroundColor = .red
      genderDropdownView.frame = CGRect(x: 0, y: 0, width: 0, height: 0)
      genderDropdownView.translatesAutoresizingMaskIntoConstraints = false
      genderDropdownButton.addSubview(genderDropdownView)
      //genderDropdownButton.bringSubview(toFront: genderDropdownView)
      //tableView.cellForRow(at: IndexPath(row: 2, section: 0))?.superview?.addSubview(genderDropdownView)
      //tableView.cellForRow(at: IndexPath(row: 2, section: 0))?.superview?.bringSubview(toFront: genderDropdownView)
  
      genderDropdownButton.addSubview(genderDropdownView)
      tableView.bringSubview(toFront: genderDropdownButton)
  
      genderDropdownView.topAnchor.constraint(equalTo: genderDropdownButton.bottomAnchor).isActive = true
      genderDropdownView.centerXAnchor.constraint(equalTo: genderDropdownButton.centerXAnchor).isActive = true
      genderDropdownView.widthAnchor.constraint(equalTo: genderDropdownButton.widthAnchor).isActive = true
      //genderDropdownHeight = genderDropdownView.heightAnchor.constraint(equalToConstant: 0)
      genderDropdownHeight = genderDropdownView.heightAnchor.constraint(equalToConstant: 0)
  
      for subview in genderDropdownView.subviews {
          subview.backgroundColor = .clear
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/y2g5W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y2g5W.png" alt="enter image description here"></a></p>