title: Find out the parent view of a clicked button in swift
body: <p>I have some code where I have 3 buttons and I would like to find out the parent view of those buttons when clicked </p>
  
  <pre><code> @IBAction func resizeButtonClicked(sender: UIButton) {
      if(sender.isEqual(resizeButton)) {
          //This is to convert to small square
      } else if(sender.isEqual(maximizeButton)) {
          //This is to convert to maximized view
      } else if(sender.isEqual(closeButton)) {
          //This is to close the view completely
  
      }
  }
  </code></pre>
  
  <p>Now I can identify the sender button but how do I identify the view this button is sitting in?</p>
  
  <p>Thank you</p>
  
  <p>Nikhil</p>