How to go back to Main Menu after 2 layers in

Discussion in 'iOS Programming' started by ppn, Feb 6, 2011.

  1. ppn macrumors member

    Joined:
    Oct 31, 2010
    #1
    I currently have a structure where I have

    Main Menu ---> Quiz View --> Results View

    I'm using the presentModalViewController and dismissModalViewController to get from 1 layer to the next but I want to be able to go from the Results View to the Main Menu without having to go through the Quiz View. Is there a way to do that without using dismissModalViewController twice? I've read somewhere else that you can use the becomeFirstResponder and define the Main Menu as the rootViewController but I'm not exactly how to implement that.
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    If this is a frequent need you may want to consider switching to using a navigation controller instead, where popping back to the top view controller is much easier. If not, I'd suggest a boolean that, when true, dismisses your QuizView when it appears.
     
  3. ppn thread starter macrumors member

    Joined:
    Oct 31, 2010
    #3
    If I use the push and pop, will I still be able to use the fancy fliphorizontal, flipvertical animations? Pushing and popping is kind of dry.
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    Seems not. Sorry.
     

Share This Page