在cell中获取父控制器ViewController,然后进行跳页

//获取控制器

- (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;

}


//写个点击事件

{

[[self viewController].navigationController pushViewController:controller  animated:YES];

}

没有更多推荐了,返回首页