dismiss a tabbed view controller from a seperate modaled to view controller - ios

So, I have a tab bar view controller, however at some point I need to manually segue to a viewcontroller that is not attached to the tab-view controller. The segue works, but then it jumps back again to the previous view controller randomly after 1/2 a second to 3 seconds, not all the time, but often. Occasionally I see a message saying something along the lines of "cannot dismiss viewcontroller while another dismiss or presentation is already taking place" but I've double checked all my code and there are only three places that make the jump, none of which can be called simultaneously. What I need to know then, is how I go about dismissing the tab viewcontroller in the view did load method of the modaled to controller. Swift explanations are no good to me thanks. Also, not related to this question persay, but can anyone tell me what the sliding bar thing that looks like a UISlider and tracks the progress of a song is called?

Related

iOS Push and Pop view controller at the same time

I am currently working on an Xamarin iOS application that has some navigation issues.
What i am currently trying to achieve is to push a ViewController while at the same time popping the previous one off. The reason for this is that I have one ViewController that shows some specific questions from this view controller i can spin up another ViewController of the same type and the user can fill in some more questions. What i want to be able to do is pop the previous filled in view controller so when the user hits the back navigation it takes me back to my home view controller (and not through all the previous instances of the question controller).
I also can't use the PopToRoot or PopToViewController.
I have tried doing a pop without animation and a push with animation and results in a quick flicker of the underneath viewController which is colourful so its a bit of a shock to the eyes.
The other thing I have tried is to manipulate the navigation stack underneath by pushing on the questionController and then removing from the stack the old viewController the problem with that is i have some tear down on the ViewDidDisappear (i work out if its a pop disappear rather than just a cover up) which doesnt seem to be called because of the manual removal. So along this method is it ok to call the ViewDidDisappear to carry out my unwiring so there is no leaks?
Many Thanks for your time reading.

Popping back quickly not possible in a navigation controller

I have a navigation controller and it won't let me quickly pop back from a view controller onto a another view controller and to another view controller. There seems to be a delay (very small) until the back button is enabled and therefore, it requires me 2 taps to be able to navigate back one more time. Is there a way to get rid of this delay?
Thanks.
UPDATE: I am not asking for the way of popping up multiple view controllers at once. What I want is to pop one by one but it seems like for a very short period after i pop one view controller the new view controller does not register my gestures, so it wont let me tap on it to pop that new view controller as well manually. The problem just seems to be that there is a small delay until i am able to register any tap gestures onto the new view controller, it appears as it is something similar to the delayTouch or cancelsTouchInView of the gesture recognizer.

Transition of a view controller embedded in a navigation controller

I have a problem with a transition. I am modifying this project https://github.com/xxxAIRINxxx/MusicPlayerTransition in order to have the transition from the right instead of the bottom. This part is fine. My transition comes from the right.
My problem is that I'm embedding the presented modal view controller into a Navigation Controller. I do this so I can use the "pushViewController" function when I click on a cell of my modal view controller.
My hierarchy is as follow. I have a dashboard. From the right, I drag a TableViewController X. If I drag back in the opposite direction, I come back to my dashboard. Fine. Now, If I tap a cell, it pushes a new ViewController Y.
Now, if I am in my new ViewController Y and that I drag back, I come back directly on my dashboard instead of going back to my TableViewController X, as a natural navigation controller should behave.
I did a small project on github that does only that, so you can easily see my entire code.
https://github.com/magohamote/NavigationControllerTransition.git
I understand why it behaves like this, but I would like to know how I can override the transition set on the navigation controller in order to have the normal behaviour of my navigation controller once it is presented.
Another problem I have not been able to solve. On the project I used as a starter (the one from xxxAIRINxxx) the transition is perfectly smooth. On mine, the first time I trigger the transition, it blinks and get stuck. Once I did it once, it is smooth the next time I drag my view. But the first time is always awful. I don't know why either :(
Thank you a lot for your help!

iOS move to segue without adding ViewController to stack

In my application i'm using the navigation controller as an "Action Bar" and in most scenarios there is no Back Icon.
If i understand correctly, when i'm using segues to move to the next screen, iOS keep a reference of my last screen so i will be able to press back and return to it quickly.
can i have the same segue with moving to next screen, but somehow tell the navigation bar not to save an instance of the the last view controller ? i need that in order to avoid duplicate view controllers in the view controllers stack, and to avoid overloading the memory.

Data disappears when switching between view controllers

I am writing an iPhone application using the storyboards for an initial mockup. The problem I have right now is switching view controllers.
I have a table view controller and another view controller. All I want to do is use a back button to go back to the original screen, and I can do that, except the data disappears. The storyboard that I have is shown below.
I have the Back button going back to the original navigation controller. I have also had it going back to the Card view controller.
I have hard coded some example cells to just see how things look and they show up just fine when I run the simulation. When I click the back button though, it goes back to the All Cards screen and the cells that were there are now gone.
If I need to post some code just ask for what part would be helpful, I have done all of this through storyboards though.
I'm sure it's something stupid I've done, any point in the right direction would be greatly appreciated.
Basically: you pushed where you should have popped.
What you are seeing on the Storyboard does not exist yet. By segue-waying during runtime to a view controller it gets instantiated.
When you segue-wayed during runtime from the Add Card view controller "back" to the Card View Controller - here is what happened: instead of popping the navigation stack all the way back to the Card View Controller you already had, you just instantiated a new Card View Controller and pushed it onto the navigation stack. You could verify that by going all the way back to the original Card View Controller by tapping the back button several times.
What you could do to accomplish your task is this:
Instead of using the Storyboard for your back button use an IBAction in code:
- (IBAction)popToRoot:(id)sender {
[self.navigationController popToRootViewControllerAnimated:YES];
}

Resources