title: button reversed when pressed
body: <p>Would like to create a button &quot;scan&quot; that is reversed and outlined when pressed (see image below)</p>
  <p>Was using a button configurator (with storyboard) but am having trouble getting background color to update with isHighlighted.  Happy to switch to SwiftUI from Storyboard if necessary.</p>
  <pre><code>@IBOutlet var imageView: UIImageView!
  
  let scanButton = UIButton()
  
  override func viewDidLoad() {
      super.viewDidLoad()
      view.backgroundColor = .black
      configButton()
      scanButton.configurationUpdateHandler = { button in
          //this transform is for testing and works
          button.transform = button.isHighlighted ? CGAffineTransform(scaleX: 0.95, y: 0.95) : .identity
          var config = button.configuration
          //changing the title works
          config?.title = button.isHighlighted ? &quot;pressed&quot; : &quot;scan&quot; 
          //config?.background = button.isHighlighted ?  //need some help
          button.configuration = config   
      }
  }
  
  func configButton(){
  
      scanButton.configuration = .filled()
      scanButton.configuration?.baseBackgroundColor = .green
      scanButton.configuration?.title = &quot;scan&quot;
      scanButton.configuration?.baseForegroundColor = .black
  
      addButtonConstraints()
  }
  
  func addButtonConstraints(){
      view.addSubview(scanButton)
      scanButton.translatesAutoresizingMaskIntoConstraints = false
  
      NSLayoutConstraint.activate([
          scanButton.centerXAnchor.constraint(equalTo: view.centerXAnchor),
          scanButton.centerYAnchor.constraint(equalTo: view.centerYAnchor),
          scanButton.widthAnchor.constraint(equalToConstant: 125),
          scanButton.heightAnchor.constraint(equalToConstant: 30)
      ])
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ylRNa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ylRNa.jpg" alt="enter image description here" /></a></p>