SHARE
TWEET

Untitled

a guest Mar 26th, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class VC {
  2.     @IBOutlet var buttons: [UIButton]
  3.     @IBOUtlet var button1: UIButton!
  4.     @IBOUtlet var button2: UIButton!
  5.     @IBOUtlet var button3: UIButton!
  6.  
  7.     @objc func clicked(sender: UIButton) {
  8.        //this
  9.        if sender == buttons[0] {
  10.  
  11.        } else if sender == buttons[1] {
  12.  
  13.        }
  14.       //or either this
  15.        if sender == button1 {
  16.  
  17.        } else if sender == button2 {
  18.  
  19.  
  20.        }
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top