title: Swift: Converting this Objective C Method
body: <p>Very new to iOS and not too sure what I am doing wrong here...
  I am following <a href="http://gibbon.co/psy2k/ios-programming-for-beginners/expandingcollapsing-tableview-sections" rel="nofollow">this tutorial</a> to build an accordion style UITableView, the author seems to have implemented a delegate function which extends <code>UITableViewController</code>.  The tutorial does not conform to any delegates, therefore I can only assume that you are able to directly write extensions.</p>
  
  <p>The original code is:</p>
  
  <pre><code>- (BOOL)tableView:(UITableView *)tableView canCollapseSection:(NSInteger)section
  {
      if (section&gt;0) return YES;
  
      return NO;
  }
  </code></pre>
  
  <p>After analysing this I constructed the following in Swift:</p>
  
  <pre><code>func tableView(tableView: UITableView, canCollapseSection section: Int) -&gt; Bool {
      if section &gt; 0 {
          return true
      }
      return false
  }
  </code></pre>
  
  <p>I know its a very simple function, but I'd like to get this func working as an extension of the base TableView functions provided.  Currently XCode does not recognise this function when I call it like</p>
  
  <p><code>self.tableView.canCollapseSection(tableView, indexPath.section)</code></p>