IOS 子视图获取父视图的控制器

UIResponder* nextResponder = [self.view.superview.superview nextResponder];

    if ([nextResponder isKindOfClass:[UIViewController class]]) {

        

        uic = (UIViewController*)nextResponder;

        uic.hidesBottomBarWhenPushed = YES;

        [uic.navigationController pushViewController:detailVC animated:YES];

    }

 

你可能感兴趣的:(ios)