Created
October 4, 2014 05:46
-
-
Save chrisbrandow/790cf841d40afc6488bb to your computer and use it in GitHub Desktop.
a recursive method for identifying the UITableViewCell that contains a particular UIView or UIView subclass (i.e. UIControl) object in its view hierarchy.
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
- (UITableViewCell *)cellContainingView:(UIView *)view { | |
return (!view || [view isKindOfClass:[UITableViewCell class]]) ? (UITableViewCell *)view : [self cellContainingView:view.superview]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment