标签:style blog color for sp div c on log
- (UIViewController*)viewController { for (UIView* next = [self superview]; next; next = next.superview) { UIResponder* nextResponder = [next nextResponder]; if ([nextResponder isKindOfClass:[UIViewController class]]) { return (UIViewController*)nextResponder; } } return nil; }
接着还可以变形为:
- (MyTableViewCell *)findMyCell:(UIGestureRecognizer *)button { for (UIView *next = [button.view superview]; next; next = next.superview) { UIResponder *nextResponder = [next nextResponder]; if ([nextResponder isKindOfClass:[MyTableViewCell class]]) { return (MyTableViewCell *)nextResponder; } } return nil; }
标签:style blog color for sp div c on log
原文地址:http://www.cnblogs.com/likun123/p/4002392.html