title: How to find if array contains object
body: <p>I have created a custom class called <code>MenuItem</code>:</p>
  
  <pre><code>import Foundation
  
  class MenuItem {
  
      var title: String
      var tag: Int
      var image: UIImage
  
      init (title: String, tag: Int, image: UIImage) {
          self.title = title
          self.tag = tag
          self.image = image
      }
  
  }
  </code></pre>
  
  <p>I am adding these objects to an array.</p>
  
  <p>How can I check if an array contains a specific menu item?</p>
  
  <p>This is a simplified version of what I have tried.</p>
  
  <pre><code>let menuOptionInventory = MenuItem(title: "Inventory", tag: 100, image: UIImage(imageLiteral: "871-handtruck"))
  var menuOptions = [MenuItem]()
  menuOptions.append(menuOptionInventory)
  
  if (menuOptions.contains(menuOptionInventory)) {
      //does contain object
  }
  </code></pre>
  
  <p>When I do this I get this error message:</p>
  
  <pre><code>Cannot convert value of type 'MenuItem' to expected argument type '@noescape (MenuItem) throws -&gt; Bool'
  </code></pre>