有3个View,分别位于3个Xib中,假设为A\B\C界面,由按钮A调用B,B调用C,C如何直接返回到A?我用的presentModelViewController和dismissModelViewContrlloer。只能返回到调用本界面的上一层界面,就是C只能返回到B,如何让C直接返回到A?

解决方案 »

  1.   

    推进用Navigation 控件。压b界面,压c界面
    其中有一个方法,可以 pop 到A界面。
      

  2.   


    -(void)ReturnA
    {
    ClassA *theView = [[[ClassA alloc] init] autorelease];
    UINavigationController *nextView = [[UINavigationController alloc] initWithRootViewController:theView];
            [self presentModalViewController:nextView animated:YES];
            [nextView release];}
      

  3.   

    push就是向前推进,pop是向后推进。