Pop all views of the stack

Discussion in 'iOS Programming' started by teengohan, May 23, 2011.

  1. macrumors newbie

    May 20, 2011
    Hi all,

    I am trying to figure out how to pop all views except for the rootview off the stack so my app. I don't know how many views there will be as it could either be none, one or two that need to be removed. Is there an easy meathid to do this?

    I already know how to pop one view.
  2. Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Look at the Class Reference for UINavigationController. There is an instance method specifically for this.
  3. thread starter macrumors newbie

    May 20, 2011
    Thanks, feel doppy now, lack of sleep is a terrible thing :S

Share This Page