user1092808 user1092808 - 2 months ago 21
Swift Question

Calling super for cellForRowAtIndexPath in Swift

I would greatly appreciate it someone could help me with the syntax for calling

super
to get the
UITableViewCell
from within
func tableView (tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!)
. This is a static table.

override func tableView (tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
// The Objective-C code is: UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
var cell = super.??
}


I have tried and tried, but cannot seem to get the correct syntax for doing this. Thanks in advance.

Answer
var cell = super.tableView(tableView, cellForRowAtIndexPath: indexPath)
Comments