在view里怎么push到某个页面

    HomeZhuTiViewController *vc = [[HomeZhuTiViewController alloc]init];
    [[self viewContainingController].navigationController pushViewController:vc animated:YES];
-(UIViewController*)viewContainingController
{
    UIResponder *nextResponder =  self;
    
    do
    {
        nextResponder = [nextResponder nextResponder];

        if ([nextResponder isKindOfClass:[UIViewController class]])
            return (UIViewController*)nextResponder;

    } while (nextResponder);

    return nil;
}

你可能感兴趣的:(在view里怎么push到某个页面)