In iOS7 UITableViewWrapperView
is the superview of UITableViewCell
, which means another superview for you:
iOS7:
UITableView *tableView = (UITableView *)cell.superview.superview;
iOS6"
UITableView *tableView = (UITableView *)cell.superview;
Another change you can find it here:
seems your code: UITableView table = (UITableView)[[[sender superview] superview] superview]; returns a UITableViewCell
not a UITableView
.
Try the below:
UITableView *table = (UITableView*)[[[[[sender superview] superview] superview] superview] superview];