Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
I have an app where the user is clicking on a few buttons which push new views on the stack 5 or 6 deep. When he finally makes a selection he must back all the way out again via the back button.

Is there a way in the final view have an extra button that would go back to the first view in the stack with just 1 click? Not pus the first view on again but remove all the others from the stack without having to back out 1 by 1?

I tried Google'n but I don't know what this would be called?

Thanks!
 
Last edited:

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
I did not. But with in a minute of looking at the Methods for that Class I discovered this which looks promising popToRootViewControllerAnimated:
 

Duncan C

macrumors 6502a
Jan 21, 2008
853
0
Northern Virginia
I have an app where the user is clicking on a few buttons which push new views on the stack 5 or 6 deep. When he finally makes a selection he must back all the way out again via the back button.

Is there a way in the final view have an extra button that would go back to the first view in the stack with just 1 click? Not pus the first view on again but remove all the others from the stack without having to back out 1 by 1?

I tried Google'n but I don't know what this would be called?

Thanks!

Do us all a favor and do your own research before you run to the forums. It's understandable if sometimes you can't figure something out, but you admitted that you didn't even look at the documentation. That gets old fast, and you burn through a lot of goodwill when you do that.
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Do us all a favor and do your own research before you run to the forums.

I do... I always go to Class references first or Google for similar problems. For some reason I wasn't sure what to search this time. I looked at UIButton and UIViews first and people with similar issues but nothing came up with my search terms. I then knew I was looking for the wrong thing so I asked.

As soon as dejo mentioned UINavigationController it became obvious right away and I found what I needed quickly.

Class Refs and Google are great if I know what I am looking for. In this instance UINavigationController wasn't the area I was looking under.

Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.