title: How to get UIButton name in swift5?
body: <p>I am currently making a <code>pin-code</code>. I want to incorporate all the functions into one function, in order to integrate the button event function into one So I want to get the name of <code>UIButton</code>, but I don't know how.</p>
  
  <pre class="lang-swift prettyprint-override"><code>@IBOutlet weak var oneButton: UIButton!
  @IBOutlet weak var twoButton: UIButton!
  ...
  var pinCodeNum : String! = ""
  ...
  
    @IBAction func OneButton(_ sender: UIButton) {
          pincodeLogic(sender)
      }
  
      func pincodeLogic(_ sender: UIButton) {
           // I want get value is (example : 'oneButton' or 'twoButton' or 'threeButton' more )
      }
  </code></pre>
  
  <p>As you can see from my code, I'm getting a '<code>sender</code>' as a parameter I want to know the name of <code>oneButton</code> or <code>twoButton</code> using this parameter. How do I know?</p>
  
  <p><a href="https://i.stack.imgur.com/T06vB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T06vB.png" alt="screen"></a></p>
  
  <p>My number button consists of a <code>button</code> and a <code>label</code>.</p>
  
  <hr>
  
  <p><strong>EDit</strong> </p>
  
  <hr>
  
  <pre class="lang-swift prettyprint-override"><code>  @IBAction func OneButton(_ sender: UIButton) {
  
          pincodeLogic(sender)
      }
  
      func pincodeLogic(_ sender: UIButton) {
           if let number = sender.currentTitle {
              print(number)
          }
      }
  
  </code></pre>
  
  <p>I can't see the print log.</p>