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
0
votes
1 answer

How to popToViewController which is not initialised in Swift?

I am facing problem in which I have four view controller on Main Screen. If the User directly go to second view controller from Main VC. I am unable to navigate to the first VC using popToViewController, because in memory we have only the two…
yo2bh
  • 1,356
  • 1
  • 14
  • 26
0
votes
1 answer

popToRootViewcontroller pushed to the same view, crashes when tap Back on pushed view

Currently I've a UITableViewController and a series of Tabs. As soon as I recieve a notification I perform the display of a local alert, and when its tapped I show the user the current conversation. My Path is. UITableViewController > Rooms > Chat…
Eddwin Paz
  • 2,842
  • 4
  • 28
  • 48
0
votes
2 answers

popToRootViewControllerAnimated doesn't set the prompt properly

I have a simple scenario : a UINavigationController with several embed UITableViewControllers. Each UITableViewController has a prompt set, except for the ROOT UITableViewController (no prompt). And in each UITableViewController, there is a…
0
votes
1 answer

Poptorootviewcontroller with delay

I have a method "test" that execute poptorootviewcontroller. I want to put some delay before the animation of poptorootviewcontroller. Here is my code : -(void)test{ [UIView animateWithDuration:5.0 delay: 2.5 …
Zoomzoom
  • 189
  • 3
  • 13
0
votes
2 answers

popToViewController failed to pop to view error

I am using the following code: @IBAction func popToRoot(sender:UIBarButtonItem){ navigationController.popToViewController(foodforteethViewController(), animated: false) } This function is linked with a custom back button and the h file is…
Prateek
  • 1,724
  • 3
  • 15
  • 27
0
votes
2 answers

Pass back data using [popviewcontroller], and reload data

https://i.stack.imgur.com/h3hnz.jpg In the picture provided above, shows three view controllers. Let's call the view controllers A, B, and C in the order they're displayed. View Controller A passes parsed jSON data by clicking on the table cell.…
Machina
  • 252
  • 2
  • 13
0
votes
1 answer

View flashes when popToRootViewController

I am having a problem with popToRootViewController. I have a root view A and a table view B. And when a row is selected in the table view I pass a string back to the root view and depending on the string. I change the title of buttons on A. I have…
user3662854
0
votes
1 answer

popToRootViewController is called before viewWillAppear

I have a UITableviewController and when a row is selected, I want to pop back to my rootViewController and have it display the text of the row in table view. What is happening right now is the viewWillAppear in my regular view controller is being…
user3662854
0
votes
2 answers

How to Pop to a View Controller without Animation

I would like to display an image in response to a local notification event that occurs while the iPhone is locked. When the user swipes on the notification, I would like my app to go to the root view controller, via popToViewController:animated, and…
0
votes
1 answer

UINavigationController push / pop bug on iOS 7.x when app is running in the background

I have set up a UINavigationController as rootViewController of my mainWindow. I push and pop viewcontrollers from code (so pushes and pops are not triggered by user interaction). When I do it when the applicaiton is in the foreground, everyhting…
0
votes
0 answers

Error - custom transitions require both a fromViewController and toViewController

I am attempting to dismiss one view controller from the presenting view controller and the upon completion handler of the dismiss, attempting to pop the presenting view controller from the navigation stack. I receive this error: custom transitions…
0
votes
2 answers

popToRootViewControllerAnimated crashes App in Xcode5 on IOS 7 sim

I have an issue with upgrading to Xcode5. Before I even set about changing anything in my project I thought I would build and run it with the IOS7 3.5inch Simulator. There are two major issues and this is the main one that I cannot figure out. I…
0
votes
1 answer

applicationDidEnterBackground fire popToViewController

I am using the Storyboard, then in my AppDelegate has no navigation controller programming on hand (all normal so far). Now i need to fire the "applicationDidEnterBackground" I would like my app point to the navigation controller to the first screen…
0
votes
1 answer

How to stay in the same tab when poping off from Navigation Controller

My intention is to create an App which has the Main View with UIButton to click. Once clicking one of the button will enter TabBarController View. For example, when you click sample1 button will automatically select 2nd tab in TabBarController View.…
0
votes
1 answer

ios popToRoot not releasing memory when using blocks

I've spent a great deal troubleshooting why the my view controller isn't being released for memory when It get's popped off the stack. Here is the cliffnotes version of what I am working with: - (IBAction)submitTurn:(UIButton *)sender { ... …
Chase Roberts
  • 9,082
  • 13
  • 73
  • 131