title: Is there a way to check if 2 UIButtons were clicked?
body: <p>I have 2 groups of <code>UIButtons</code> with Pass or Fail. I need to check if in both groups was clicked any of the UIButtons (Pass or Fail) to scroll down to next question.</p>
  
  <p>I'm using a delegate with 4 parameters (my 4 buttons) and I'm doing a <code>if</code> check, but is never entering in my <code>if</code> condition. Here's how my group of buttons looks:</p>
  
  <p><a href="https://i.stack.imgur.com/wEcCS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wEcCS.png" alt="enter image description here"></a></p>
  
  <p>Here is my code:</p>
  
  <pre><code>func tappedOnVehicleOrTrailerButtons(vehiclePassBtn: UIButton, vehicleFailBtn: UIButton, trailerPassBtn: UIButton, trailerFailBtn: UIButton) {
  
      if (vehiclePassBtn.isTouchInside || vehicleFailBtn.isTouchInside) &amp;&amp; (trailerPassBtn.isTouchInside || trailerFailBtn.isTouchInside) {
  
          scrollDown()
      }
  }
  </code></pre>
  
  <p>Here is the delegate method:</p>
  
  <pre><code>// Check if the user press Pass or Fail btn for Vehicle or Trailer
  
  @IBAction func passOrFailBtnTapped(_ sender: UIButton) {
            delegate?.tappedOnVehicleOrTrailerButtons(vehiclePassBtn: vehiclePassButton, vehicleFailBtn: vehicleFailButton, trailerPassBtn: trailerPassButton, trailerFailBtn: trailerFailButton)
  }
  </code></pre>
  
  <p>Is any other way to do it instead of <code>if</code> statement?</p>