Analog of setViewControllers:animated: in NavigatorIOS - ios

I would like to pop a view from the navigation stack (login screen) and immediately push another view (home screen) with NavigatorIOS.
In iOS I would achieve this using UINavigationController setViewControllers:animated:.
I have tried navigator.replace, navigator.replaceAtIndex but that doesn't quite work - it does replace the view but he navigation bar is hidden on the pushed screen (my login screen has it hidden, which is defined in its route properties), and there is no transition animation.
Another option that I tried is using navigator.pop followed by navigator.push. It did result in an animated transition but the login screen was still on the navigation stack (it wasn't popped) and the back button was visible.
What is the proper way to do this with NavigatorIOS?

Related

IOS using different navigation bars

I'm creating an application where I need to use two different navigation bars. When the application first opens up, the nav1 bar should be displayed with an image and a Login button .. when they login screen appears, there is no nav bar. After login, it goes to a Detail screen where I need to show a back arrow image, a screen title and a menu button with drop down options.
I'm using one View_Controller that all my Views inherit from. I've been working on this for days and I'm so lost, please help.
I'm a little confused about the structure of your app.
As I understand it, you want an initial view that is contained in a UINavigationController. Once someone taps the "Login" UIBarButtonItem on the UINavigationBar, then you have a view come up that is not contained in a UINavigationController (probably because it is a modal view that is outside the navigation flow of your app).
The part I'm confused about is where the Detail view comes in. Is the modally presented view dismissed while the Details view is pushed onto the navigation stack from the initial view? Why does the Details view need a back button? Does going back to the initial view effectively log out the user?
At any rate, you should be able to change the UINavigationBar for every view that is pushed on to the stack (that is also contained in your UINavigationController). If you are using Storyboard, you need to make sure that you embed the views pushed on to the stack in a UINavigationController. You can do that by going to the "Editor" menu, selecting "Embed in" and then selecting "Navigation Controller".
Let me know if I didn't understand your question or if you can post more details.
Navigation bar will be the same in the app. You can hide it, show it, change title, change background color, or background image on each view depending on your requirements. But there is only one navigation bar in navigation based apps.

iOS7 Keep UINavigationBar and animate only the view on segue

There is one thing i thinking about for days now. I want to keep the same navigation bar on every viewcontroller in my app (like in the amazon app) and show the push animation (push segue) only on the view itself without touching the nav bar.
Is there a simple way to do that?
If both of the views are inside the same UINavigationController, then the nav bar will not be changed at all when you use the push segue. If you don't want any nav bar title animations, etc just set the same title/buttons on the next view, and it will look like nothing changed. When the new view controller is pushed, the nav bar will remain the same, and only what's under it will change.

Stop UIViewController Animation on dismiss

I have a UIViewController that I display full screen, then when the user touches a button I present another view controller like so:
[self.navigationController pushViewController:loadSaveViewController animated:YES];
I like the animation that happens when I transition TO the view controller i.e. the main view shifts down and slides off to the left and the new view controller is displayed with the nav bar at the top.
HOWEVER, when I go back using the button at the top of the nav bar the screen does the opposite. The main screen appears, but with a nav bar at the top for a short time then the main screen shifts up.
How do I stop the main screen from doing the animation? When the user returns to the main screen, I do not want them to see the nav bar and the shift up, I just want the main screen to appear, or slide in.
Thanks for the help.
In iOS 7, there are new classes that will allow you to control every aspect of animation. This website is very useful ios 7 transitioning

iOS Push Navigation Controller, without a bar on the second view

I have an iOS App, designed within a UINavigationController. One of the pushed view controllers, however, needs a full screen view, without the navigation bar on the top. (to get back, there is just a small, circular button). However, any method I've tried of 'hiding' the navigation bar (navigationCtl.navigationBar.hidden=TRUE) leaves me with ugly artifacts - calling that before the view is pushed (in viewDidLoad or viewWillAppear) causes the previous view controllers bar to flash white just as the slide left animation starts. Similarly, calling it in viewDidAppear leaves a white bar at the top of the second view, along with several subviews pushed down, out of the way. Is there any way I can just have the new view slide over as it usually does, but when it comes over, there's simply no navigation bar up top?
Please note, to help Google, essentially the question here is:
How to animate between two UIViewControllers, when one has a navigation bar at the top, and the other one does not have a navigation bar at the top. So, how to navigate from a UIViewController with a navbar to one without a navbar - avoiding the horrible flickering.
The amazing answer is given below by Ev ... awesome.
give this a spin and see how it works for you.
in the destination view controller in viewWillAppear
- (void)viewWillAppear:(BOOL)animated {
[self.navigationController setNavigationBarHidden:YES animated:YES];
}
It actually has a cool effect and can be useful. in the viewWillAppear everything happens before the view is displayed so it takes away the strange artifacts.
be well

iOS UISplitViewController - hide master view pane with smooth transition

I'm working on an iPad app with the UISplitViewController. I've managed to add a button on the detail view navigation bar to 'maximise' the detail pane in landscape mode by hiding the master view (like Dropbox does). I did this by setting the split view controller delegate to nil and then back to it's delegate in order to force 'shouldHideViewController' to fire. This works but there's no transition - it just flicks to full screen. I'd like the view to stretch across the screen in a transition (as Dropbox does).
Can anybody suggest a way to achieve this?

Resources