项目需要,不借助代理,block等,直接在cell中处理点击事件。
需要先获取cell所在的控制器,然后就可以操作你想要的。
- (UIViewController *)getSuperController{
UIViewController *vc = [[UIViewController alloc]init];
for (UIView* next = [self superview]; next; next = next.superview)
{
UIResponder* nextResponder = [next nextResponder];
if ([nextResponder isKindOfClass:[UIViewController class]])
{
vc = (UIViewController*)nextResponder;
break;
}
}
return vc;
}