title: How to pass a Struct to a method that is expecting an AnyObject?
body: <p>I am starting to get my head around Structs in Swift, and changed one of our app's data models to a Struct.</p>
  
  <p>In a view controller we have, we use this method:</p>
  
  <pre><code>    override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
          //Some code
          self.performSegueWithIdentifier("JobDetailSegue", sender: job)
      }
  </code></pre>
  
  <p><code>job</code> above is of type <code>JobModel</code>, which is a class that I just converted to a struct.</p>
  
  <p>However, compilation is failing on the line with <code>self.performSegueWithIdentifier("JobDetailSegue", sender: job)</code> with error <code>Cannot convert value of type 'JobModel?' to expected argument type 'AnyObject?'</code></p>
  
  <p>So I take it that methods that accept an <code>AnyObject?</code> won't take a Struct as an argument? If so, what is the correct way to use Structs in this scenario (if at all)?</p>