title: Assigning value to Search Bar Delegate - Swift
body: <p>So I was following <a href="http://shrikar.com/swift-ios-tutorial-uisearchbar-and-uisearchbardelegate/" rel="nofollow">this</a> link for implementing a Search Bar in my Table View.</p>
  
  <p>I had to make a few changes because my cells contained Objects with different values and data types and so I had to adapt the Search function accordingly.</p>
  
  <p>I'm pretty sure I have most of it working, I just have 2 questions.</p>
  
  <ul>
  <li>On creating the variable representing the UI Table View being used, notice (in the link) that he calls the variable <code>tableView</code> (at the top of script). Would this interfere with the rest of the tableView variables used in the many functions in the class? Does it not act as a global variable, affecting others of the same name in his class?</li>
  <li>I receive the error <code>Cannot assign a value of type '...ViewController' to a value of type 'UISearchBarDelegate'</code> on the line <code>searchBar.delegate = self</code>
  It seems to me like this is the only error I have and everything else is fine. So what is wrong here, and how might I go about fixing it? Have I made a mistake somewhere or is the mistake in the link?</li>
  </ul>