Questions tagged [popviewcontroller]

146 questions
54
votes
16 answers

Can i pop to Specific ViewController?

I am using navigation based application. I push First ViewController to Second ViewController and from Second ViewController to Third ViewController. Now I want to pop from Third ViewController to First ViewController.I am performing this task using…
Ankit Vyas
  • 7,401
  • 13
  • 52
  • 87
46
votes
7 answers

popping and pushing view controllers in same action

is is possible to pop a view off the navigation stack and then push another straight onto it? I'm trying to implement a flat hierarchy for this section and would like to have a segmented controller but I can't make the segmented controller look…
Josh
  • 3,280
  • 3
  • 34
  • 52
15
votes
4 answers

iOS: How to Recognize that We Got Back from a Child UIViewController within the Parent UIViewController?

Let's say that I have 2 UIViewControllers on a stack within a UINavigationController. In the "parent" we call "[self.navigationController pushViewController:childViewController animated:YES];" upon some user action and in the "child" we call…
13
votes
3 answers

Storing UITextField contents before view pops

I am sure this is in the Apple documentation or must have been answered somewhere on this forum, since it seems so basic, but I could not find it nor a particularly elegant solution myself. What I have is a UIViewController that pushes an editing…
LavaSlider
  • 2,424
  • 17
  • 29
11
votes
1 answer

UINavigationController navigation stack problems in landscape mode

I have an iPhone application that I am currently converting to a universal binary to work with the iPad. I have successfully implemented everything I need in terms of layout so that full landscape functionality is now supported in my app (previously…
10
votes
4 answers

iOS: isMovingToParentViewController is not working as expected

My setup is simple, and my issue is not very different from this one. However to better explain it I have posted it here: NavController -> VC1 -> VC2 VC1 is root view controller of NavController. VC2 is accessible via Push segue from VC1. I want to…
8
votes
1 answer

iOS WatchKit - How to detect when back button is pressed on Watch?

I need to do some cleanup on 2nd view controller when the back button (arrow) is pressed on the Apple Watch. Is there any sort of method for detecting/handling when a back button is pressed / view is popped? Note - I can't use 'willDeactivate()'…
6
votes
4 answers

UINavigationController loading view incorrectly due to Orientation/Shake

Background: App has a shake to go home feature. Home view Only supports portrait. If you shake a bit harder than usual, the view that you are on starts to rotate (which is fine) , but then it detects a shake and does a popViewControlller to the…
Sum
  • 4,259
  • 1
  • 19
  • 38
6
votes
2 answers

popViewController does not autorotate back to allowed orientation

I have two UIViewControllers, "A" and "B", where "A" overrides the shouldAutorotateToInterfaceOrientation to return YES for UIInterfaceOrientationPortrait, and "B" returns YES for all orientations. In my example "A" is the root navigation view…
JoeGaggler
  • 1,107
  • 1
  • 14
  • 25
5
votes
3 answers

popViewController / viewWillAppear not animated in iOS 5

I wasn't lucky with searching for this, so here we go ;) I have a UIViewController with a custom UINavigationBar which pushes another UIViewController as subview. Everything works fine except when I click the back button on the subview. The previews…
Hannes
  • 3,553
  • 2
  • 34
  • 43
5
votes
1 answer

how to prevent keyboard from dismissing while using popViewController custom transition

To provide the interaction pop gesture in full view, i have a UIPanGestureRecognizer in my controller with which we can swipe from left to right any where in the view controller to pop the controller, instead of using the default…
5
votes
2 answers

Strange behavior of NavigationBar after multiple push and pop with animation NO. iOS7

Problem while multiple pop and push operation performed on UINavigationController programmatically with animation NO. ( iOS7 iPhone Only ) Source Code https://github.com/abhishek9284/NavigationBarTest To understand problem consider following view…
4
votes
3 answers

Change animation transition

I got an app with NavigationController. How can i change animation transition style of pushViewController and popToViewController? UPD I created category like in @lawicko answer. But i got error when i am trying to call…
4
votes
3 answers

Trouble with using popViewController flashing white during transition

I have been struggling with switching between views using the UINavigationalController. I have used this system many times without issue but in my new app it isn't working properly. Here is the issue: When i am pushing a new view controller i use…
iOS4Life
  • 206
  • 2
  • 12
4
votes
1 answer

Pass data to previous viewcontroller VIPER

I am using VIPER architecture in iOS swift. I have 2 viewcontrollers, let's say A and B. At first I'm going from A to B, performing some tasks and coming back from B to A. With MVC or MVVM, we can create protocols and transfer data from B to A. But…
Arnab
  • 3,267
  • 1
  • 26
  • 39
1
2 3
9 10