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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-07-2010, 02:40 PM   #11 (permalink)
atomCoder
Registered Member
 
Join Date: Oct 2010
Posts: 2
atomCoder is on a distinguished road
Default

Quote:
Originally Posted by nobre84 View Post
I've ran into this some times. Its the animation. Until the first pop finishes you can't pop again or the nav bar buttons will bug on you. Change the second pop to viewDidAppear and see if it helps. This way it will pop back and pop again one animation at a time.
If you need to pop straight to the right controller you can try
Code:
int count = [self.navigationController.viewControllers count];
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:count-2]];
Keep in mind that

Code:
[self.navigationControllers.viewControllers count]
will return a number that is one more than the index for the current view. If you're popping multiple controllers, you will want to subtract one plus the number of controllers your moving back.

Another way, which might be more inelegant (but it works) is to assign a pointer to the navigation controller, then call popViewController:animated twice:

For example:
Code:
UINavigationController *navController = self.navigationController;

[navController popViewControllerAnimated:NO];
[navController popViewControllerAnimated:YES];
atomCoder is offline   Reply With Quote
 

» Advertisements
» Online Users: 440
14 members and 426 guests
antonwilliams, dobry, Domele, ephefei, Gaz, hrushikeshaddon, ipodphone, jaychoupham, linkmx, Mnadeep, observer247, raymng, santicarlo, Techknol
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,589
Threads: 94,083
Posts: 402,775
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Techknol
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:50 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.