ios 返回到指定的VC

可以让某个VC页面先跳转到Appdelegate页面,然后通过appdelegate跳转到指定的页面

        AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                UINavigationController *nav = (UINavigationController *)app.window.rootViewController;
                [nav popToRootViewControllerAnimated:NO];先推到顶堆栈,然后从堆栈指定到某个页面
                IndexViewController *index = (IndexViewController *)nav.topViewController;
                UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
                btn.tag =1;
                [index menuAction:btn];

posted on 2013-07-08 16:22  songbai  阅读(1020)  评论(0编辑  收藏  举报