Hi,
I have an issue calling a member function of a table view controller. I've reproduce the problem with the following dummy view controller:
import UIKit
class SimpleTableViewController: UITableViewController {
/
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
/
return 2
}
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
/
return 1
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
return tableView(tableView, cellForFooAtIndexPath: indexPath)
}
func tableView(tableView: UITableView, cellForFooAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath)
/
return cell
}
}The compiler complains on line 13 with the following error "Cannot call value of non-function type" ?!!!
If I prefix the call with 'self.', everything compiles without errors. Sounds like a bug to me or is there some rules I've missed or calling member functions in Swift 2.1 (I must admit I haven't re-read the latest Swift iBook) ?
Note, I use xcode 7.1.1 (7B1005) and compiled with the default settings for a new single view iOS project.