title: Swift create custom logic for radio button
body: <p>I have four custom <code>UIButton</code>, I applied button image radio (checked and checked). four button I have separate action method I can change the Image easily but if I <em>checked</em> first button another three button need <em>uncheck</em>. it should react like radio button.</p>
  
  <p>Here, below my code </p>
  
  <pre><code> @IBAction func first_scheme(_ sender: Any) {
  
          bRec = !bRec
          if (bRec == true) {
              firstscheme_button.setImage(UIImage(named: "uncheck.png"), for: .normal)
          } else {
  
              firstscheme_button.setImage(UIImage(named: "check.png"), for: .normal)
          }
      }
  </code></pre>