【发布时间】:2016-09-24 00:25:32
【问题描述】:
我有一个动态生成的 UITableView,其中包含许多动态 UITableViewCells 和一个静态 UITableViewCell。
静态的有一个按钮,我想在用户按下它时刷新整个表格视图。
我附加到单元格的代码很简单:
class MyStaticCell: UITableViewCell {
@IBOutlet weak var sendCommentButton: UIButton!
@IBAction func sendCommentButtonAction(sender: AnyObject) {
//from here I want to refresh the table
}
}
如何通过该按钮刷新父表?在MyStaticCell 类中,我没有任何表实例,所以这是我现在的问题:|
【问题讨论】:
标签: ios swift uitableview swift-protocols