我尝试2种方式解雇2个viewcontrollers连续,但其中只有一个被开除不是第二个驳回2的ViewController连续
方法1
-(void) LoginDone:(NSNotification *)notif
{
[self dismissViewControllerAnimated:YES completion:NULL]; //previous viewcontroller
[self dismissViewControllerAnimated:YES completion:NULL]; //current viewcontroller
}
方法2
-(void) LoginDone:(NSNotification *)notif
{
[self dismissViewControllerAnimated:YES completion:NULL];
[[NSNotificationCenter defaultCenter] postNotificationName:@"LoginDone2" object:nil];
}
-(void) LoginDone2:(NSNotification *)notif
{
[self dismissViewControllerAnimated:YES completion:NULL];
}
我需要找出一种方法连续地消除先前的viewcontroller和当前的viewcontroller。
很好的答案,但首先你必须关闭当前视图控制器的视图,然后才可以关闭呈现视图控制器的视图。 – etayluz 2014-02-23 22:38:13