Created
May 26, 2014 16:35
-
-
Save Kirow/97bf87b68d6d59ce263f to your computer and use it in GitHub Desktop.
Return Cell superview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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