【发布时间】:2016-01-17 23:12:22
【问题描述】:
我想要这样的东西
class MyView: FormViewController {
@IBOutlet weak var table: UITableView!
// etc..
}
但是我无法实现cellForRowAtIndexPath 或numberOfRowsInSection,因为它们已经在 Eurka 库中实现了。我也尝试覆盖这些函数但没有成功:
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if tableView.restorationIdentifier != "myTable" {
return tableView.numberOfRowsInSection(section)
}
return myDataType.count
}
【问题讨论】:
-
没有
UITable这样的东西。为什么将视图控制器称为“MyView”?在文档中查找UITableViewDataSource。 -
@Mundi 也许有人实现了自定义
UITable类 -
用“UI”作为前缀?看起来更像是马虎。只是出于兴趣:将
UITableView子类化的好场景是什么?? -
很抱歉在这里复制它很草率(在上面更正了)。但是,这并不能解决我的问题;)
-
嗨,你得到什么了吗?
标签: ios swift eureka-forms