Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 62

Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
05/02/13 08:18 PM (12 years ago)

Tap the Back Button and go back 2 screens

Hi All, I have an interesting question: How would I have the user tap the back button and have the screen skip over the previous screen and go back 2 screens? Jake
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
05/02/13 08:21 PM (12 years ago)
you'll have to overwrite the backbutton by creating a new uibarbuttonitem and setting it as the left button on the navigation item. Add a selector method to it, and in the method, pop the viewController twice.
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
05/02/13 08:22 PM (12 years ago)
Is there a way to have one view controller show when it is first tapped on, and another when the user taps back? Jake
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
05/02/13 09:37 PM (12 years ago)
You mean, make the back button not actually go back in history, but go to a different viewController altogether? If so, in your selector method for the button, just push the new viewController. Or if it's a plugin, call the handleTapToLoad method.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.