如果有人能帮助我了解调用 super
的语法以从 func tableView (tableView: UITableView!, cellForRowAtIndexPath) 中获取
。这是一个静态表。UITableViewCell
,我将不胜感激indexPath: NSIndexPath!)
override func tableView (tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
// The Objective-C code is: UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
var cell = super.??
}
我试了又试,但似乎无法获得执行此操作的正确语法。提前致谢。
最佳答案
var cell = super.tableView(tableView, cellForRowAt: indexPath)
关于uitableview - 在 Swift 中为 cellForRowAtIndexPath 调用 super,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24481440/