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
4 answers

poptorootview when click on alerrtview ok

I have a home view ,when click on that it is going to another view again i am going to another view.when click on a button on that view a modalview will appear and then subsequently 3 more modal views when click on each modalview.when click on the…
priyanka vijesh
  • 227
  • 1
  • 3
  • 7
0
votes
1 answer

popToViewController with a specific UITabBarController Tab/View

I am using popToViewController method to pop to a view controller. What I was trying to achieve is to pop to an UITabBarController's specific index. NSArray *viewArrays = [self.navigationController viewControllers]; So my view hierarchy…
Bartu
  • 2,189
  • 2
  • 26
  • 50
0
votes
2 answers

how to popToViewController with ARC and Storyboard

anybody know how to popToViewController ? example: introvideo-> welcomeview & tutorialview-> mainviewcontroller-> scannerviewcontoller-> questionview ->(if answer correct -> correctView) else ->wrongView how do i pop back to mainView controller ?
Desmond
  • 5,001
  • 14
  • 56
  • 115
-1
votes
1 answer

viewWillAppear does not call in IOS 13 objective C

I have a large app that was created under Xcode 8 (so its old school). I am not using swift or storyboards, all controls are created in code. Since moving to IOS 13 / Xcode 11.3, when a VC delegate is pushed onto the navigation controller, and then…
cavuco
  • 99
  • 1
  • 12
-2
votes
1 answer

Does "popToViewController" pop all the view controllers in between too?

Navigation controllers have a stack of view controllers. So, let us say the stack looks like this: [Home, friends, highScores, Add, fullList] Therefore I am currently on fullList, the top view Controller in the stack. Now if I do: var stack =…
dan martin
  • 1,307
  • 3
  • 15
  • 29
-3
votes
2 answers

Go to some other ViewController on Tap navigation back button

Normally,tap back button would take me to previous view controller, but I want to go to some other view controller when I tap back button .so this is what I do: - (void)viewWillDisappear:(BOOL)animated { [self.navigationController…
John
  • 525
  • 3
  • 14
-3
votes
1 answer

Objective-C: Accessing a variable in another class

In my app, I am trying to access a variable that is set in one class (ClassC), and then pops off 2 views to ClassA, and that view (ClassA), needs to access that variable set in ClassC. Let's see if I can make this a little clearer: A button in my…
VonKoob
  • 77
  • 1
  • 9
1 2 3 4 5
6