Questions tagged [poptoviewcontroller]

popToViewController is method in UINavigationController class that is part of iOS SDK. By calling this method you pop view controllers until the specified view controller is at the top of the navigation stack.

The definition of method is next:

- (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated;

Parameters

  1. viewController: The view controller that you want to be at the top of the stack.

  2. animated: Set this value to YES to animate the transition. Pass NO if you are setting up a navigation controller before its view is displayed.

Return Value

An array containing the view controllers that were popped from the stack.

82 questions
1
vote
0 answers

iOS KERN_INVALID_ADDRESS Crash when Popping to Root View Controller with a UISearchBar

I am having an issue in my App where I have the following structure inside of a Navigation controller: RootView (Menu) -push-> UITableViewController with a UISearchDisplay Controller -selecting a row pushes-> Detail View Controller for the selected…
1
vote
2 answers

iOS - nested push animation can result in corrupted navigation bar

In my app, I have UIViewControllers A,B,C,D. What I do it traverse from A to B to C to D. Now the stack reads like A,B,C,D I then remove C and D which are the top 2 items in the stack using [self.navigationController…
Timothy Rajan
  • 1,947
  • 8
  • 38
  • 62
1
vote
4 answers

call popToRootViewController from another tab

I have tab bar with navigation controller app using storyboard , my purpose is to press a button in tab3 and in the background I want tab1 to "popToRootViewController" the button in tab3 viewcontroller: - (IBAction)Action:(id)sender { vc1 *…
Bar
  • 603
  • 1
  • 7
  • 19
1
vote
1 answer

How many layers deep in UINavigation?

How do you see how many layers you are removed from rootViewController in stack with UINavigation?
aug2uag
  • 3,379
  • 3
  • 32
  • 53
1
vote
2 answers

Assigning a variable during [self.navigationController popToRootViewControllerAnimated:YES];

I am looking for a way to assign ivar when [self.navigationController popToRootViewControllerAnimated:YES]; is called, similarly to how you can set values when a segue is called: if ([segue.identifier isEqualToString:@"login"]) { [sender…
DevC
  • 6,982
  • 9
  • 45
  • 80
1
vote
1 answer

Force Viewdidload on Poptorootviewcontroller

Is there a way to force viewdidload on poptorootviewcontroller? I've got an app in which in appdelegate I create a NavigationController and in the RootViewController there's an animation which calls, through locationdidupdate delegate method, many…
Bellots
  • 1,703
  • 3
  • 19
  • 29
1
vote
0 answers

ChildViewController = 0 then crash after popToRootViewController

I'm encountering the strange crash with combination of popToRootViewController and NavigationControllerDelegate. There are 3 tableViewControllers created in Storyboard. RootViewController - secondViewController - ThirdViewController Then I…
1
vote
2 answers

popToViewController and memory management

I have three view controllers pushed in navigationcontroller on the third one i used the statement [self.navigationController popToViewController:(Main_View*) mainViewObj animated:YES]; It takes me directly to my specified controller say first. I…
Hassy
  • 5,068
  • 5
  • 38
  • 63
1
vote
3 answers

PopToViewController in UIStoryboard application

I have made on application using Xcode 4.5. and also use UIStoryboard in this application. In this app, I push from one ViewController to second ViewController and then push from second ViewController to third ViewController. Now, How I can Pop…
1
vote
0 answers

popToRootViewControllerAnimated causing the app to crash when the device orientation changes

I am working on a navigation based project. To get from A to B,I do this : First *firstClass=[[First alloc] initWithNibName:@"first" bundle:nil]; [self.navigationController pushViewController:firstClass animated:YES]; Then from B to C, I do…
Raj
  • 1,119
  • 1
  • 15
  • 32
1
vote
2 answers

viewWillAppear method not being called after popToRootViewController

I have a view controller,that is a UINavigationController, that at some point pushes (navigationcontroller pushViewController: animated:) a second view that later pushes a third view where I have a button that pops back to the root view…
Lucas Pereira
  • 569
  • 1
  • 11
  • 23
1
vote
1 answer

Changing properties of an open ViewController via NavigationController stack

Wondering how I can set properties of view controllers that are already on the NavigationController's stack My situation: I want to set up an image uploading flow like this (Navigation Stack) RootViewController -> TakePictureViewController ->…
Doug
  • 859
  • 1
  • 9
  • 20
1
vote
1 answer

PopToRootViewController when pressing the selected Tab of a CustomTabBar

Well, I have a custom TabBar to add a center raised tab on my app. So I have a CustomTabBarViewController. I would like to make it work like apps like Twitter. When a selected tab is pressed a PopToRootViewController will be made. I have my raised…
0
votes
1 answer

UINavigationController issue with popToRootViewController

So lets say that I am in viewcontroller, C and I want to transition to viewcontroller D (which is voteView here). So here's what I did: VoteViewController * voteView = [[VoteViewController alloc] init]; voteView.voteInfo = [array…
xonegirlz
  • 8,889
  • 19
  • 69
  • 127
0
votes
1 answer

How to push a view controller onto navigation stack AFTER executing popToRootViewController

I am trying to push a new view controller onto a navigation stack only after I pop the stack to rootviewcontroller //Select the tab I want to go to self.tabBarController.selectedIndex = FEEDPAGE_INDEX; //Retrieve the navcon in the feed…
Zhen
  • 12,361
  • 38
  • 122
  • 199