我正在TableViewController中注册一个来自Nib的自定义单元格。
tableView.registerNib(UINib(nibName: "CustomCell", bundle: nil), forCellReuseIdentifier: "Cell")
但是我的CustomCell有些IBAction方法需要访问tableView本身和fetchedResultsController。如何以一种清晰的方式将这些参数传递到CustomCell中?
在以下内容中设置这些内容:
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) {
return tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
}
这种方式不太干净,对我来说?