In iOS7 beta 5 UITableViewWrapperView
is the superview of a UITableViewCell
. AlsoUITableView
is superview of a UITableViewWrapperView
.
So for iOS 7 the solution is
UITableView *tableView = (UITableView *)cell.superview.superview;
So for iOSes up to iOS 6 the solution is
UITableView *tableView = (UITableView *)cell.superview;
http://stackoverflow.com/questions/15711645/how-to-get-uitableview-from-uitableviewcell