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;
}
网友评论