Skip to content

Instantly share code, notes, and snippets.

@Kirow
Created May 26, 2014 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kirow/97bf87b68d6d59ce263f to your computer and use it in GitHub Desktop.
Save Kirow/97bf87b68d6d59ce263f to your computer and use it in GitHub Desktop.
Return Cell superview
@implementation UIView (CellSuperview)
- (UITableViewCell *)cellSuperview {
UIView *tableCell = self;
do {
tableCell = tableCell.superview;
} while (tableCell && ![tableCell isKindOfClass:[UITableViewCell class]]);
return (UITableViewCell *) tableCell;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment