Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-18-2010, 05:15 PM   #1 (permalink)
Registered Member
 
Join Date: Jul 2009
Location: Wien/Austria
Posts: 242
Default UINavigationController: Back Action

Hi Folks,

when I use this code I am able to switch from one view to the other:

Code:
	ShowGameController *controller = [[ShowGameController alloc] initWithNibName:@"ShowGameController" bundle:[NSBundle mainBundle]];
	[self.navigationController pushViewController:controller animated:YES];
	[controller release];
	controller = nil;
}
When I use an (IBAction) instead of the normal "Back" Button, then the view is not flipping to the left, but to the right...

How can I switch the views that it is switching to the left?

Thanks for your help,

Stefan
StefanL is offline   Reply With Quote
Old 03-20-2010, 08:09 PM   #2 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 31
Default

Generally speaking Pushing a view goes forward, popping goes back.

Try using popViewControllerAnimated instead and that will return to the previous view in the navigation controller.
__________________
lepetitapps is offline   Reply With Quote
Old 03-21-2010, 04:48 PM   #3 (permalink)
Registered Member
 
Join Date: Jul 2009
Location: Wien/Austria
Posts: 242
Default

Hi LepetitApps,

thanks for your help! Works like a charm...

there is another nice option:

popToRootViewControllerAnimated:YES

BR,

Stefan
StefanL is offline   Reply With Quote
Reply

Bookmarks

Tags
back-button, uinavigationcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 271
19 members and 252 guests
ADY, Alsahir, Dani77, Desert Diva, Duncan C, F_Bryant, Grinarn, HemiMG, Herbie, jansan, linkmx, M@realobjects, macquitzon216, prchn4christ, Robiwan, smethorst, spiderguy84, twerner
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,761
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:42 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0