title: IOS/Swift: check for button image to toggle button image
body: <p>I am just learning Swift and am trying to toggle a button based on a user action between two images. It would be nice to just check the name of the images showing and toggle to the other one.</p>
  
  <p>I am able to get the image from the button but not necessarily it's name.  My question is how to compare it to the image name in Swift. </p>
  
  <pre><code>func toggleImage(){
      var img = self.sendButton.image(for: .normal)//NO ERROR
      if img.isEqual(image-one) {
          //ERROR HERE
          //switch to image-two
      } else {
          //switch to image-one
      }
  }
  </code></pre>
  
  <p>Thanks in advance for any suggestions.</p>