How can i Get container UITableView in a cell of the TableView
is any way to access th开发者_JS百科e UITableView that contains current UITableViewCell in the cell?
You can go up the view hierarchy until you find a UITableView:
UIView *v = self;
while (v && ![v isKindOfClass:[UITableView class]]) v = v.superview;
// v now holds the table view, or nil if there isn't one
Although you should probably question why exactly the cell is needing to poke at the table view, and whether there is a more straightforward way to do it.
For iOS 8+:
UITableView *tableView = cell.superview.superview;
精彩评论