我在我的iPhone应用程序中使用SWRevealViewController。
成功登录后,我将从我的视图控制器创建SWRevealViewController。
profileView *frontViewController = [[profileView alloc] init];
RearViewController *rearViewController = [[RearViewController alloc] init];
UINavigationController *frontNavigationController = [[UINavigationController alloc] initWithRootViewController:frontViewController];
UINavigationController *rearNavigationController = [[UINavigationController alloc] initWithRootViewController:rearViewController];
SWRevealViewController *revealController = [[SWRevealViewController alloc] initWithRearViewController:rearNavigationController frontViewController:frontNavigationController];
revealController.delegate = self;
frontViewController.user_id = [defaults objectForKey:@"userid"];
appDelegate.user_id = [defaults objectForKey:@"userid"];
[self.navigationController pushViewController:revealController animated:YES];现在,我想注销并返回到viewcontroller。我试过poptoRootviewcontroller,但不起作用。该怎么做呢?
发布于 2014-01-14 05:04:35
尝试这个-从您的前面/后面的viewController呼叫:
[self.revealViewController.navigationController popViewControllerAnimated:YES];发布于 2014-06-27 15:05:56
在您的操作中尝试此代码:
ViewController *vc = [[ViewController alloc]init];
UINavigationController *nvc = [[UINavigationController alloc]initWithRootViewController:vc];
[reveal pushFrontViewController:nvc animated:YES];https://stackoverflow.com/questions/20475503
复制相似问题