Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure only return UITableViewCell if that cell is loaded into the Ta…

…bleView
  • Loading branch information...
commit faee75d3f2c59aeb9c1cee2b38f2dd7cfda02a03 1 parent 76a855b
Eric + Chaise authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 Additions/UIAccessibilityElement-KIFAdditions.m
View
7 Additions/UIAccessibilityElement-KIFAdditions.m
@@ -22,11 +22,14 @@ + (UIView *)viewContainingAccessibilityElement:(UIAccessibilityElement *)element
element = [element accessibilityContainer];
if([element isKindOfClass:NSClassFromString(@"UITableViewCellAccessibilityElement")]){
- element = [element performSelector:@selector(tableViewCell)];
+ UITableViewCell *cell = [element performSelector:@selector(tableViewCell)];
+
+ //If the cell has a superview (has been loaded into the table) then the cell is the view we are after
+ if(cell.superview)
+ element = (id)cell;
}
}
return (UIView *)element;
}
-
@end
Please sign in to comment.
Something went wrong with that request. Please try again.