Can't display UITabBarController after pushViewController - ios

This is the flow I have:
Public screen with login button
Click login button will display a Modal screen
After successfully logged in, I push a UIViewController to the main screen which is in my storyboard designed as Tab Bar Controller with 3 different views
It did push to the intended view, but the UITabBar at the bottom is gone. So the view which should be inside UITabBarController is missing the bottom bar, I cannot navigate.
How can I solve this issue? or should I do something else instead of pushViewController:?
Thanks.

Related

Analog of setViewControllers:animated: in NavigatorIOS

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?

Why Tab bar is going to hide when Push to another View in objective c

I am using TabBarController with four tabs in my applicatin. In the second Tab I'm using PageViewcontroller. PageViewController contains Five pages. Where the first Page view contains the button. On button click we can navigate to another view. When we navigate to another view, the tab is going to hide.
But I don't want to hide the Tab bar.
Anyone can please help to resolve this problem.
Thanks
In order to make UITabBar visible in all the screens of your app you need to take UINavigationController for all the tabs, UINavigationController will be the viewControllers with relational segue and UINavigationController's root view controllers will be your initial controllers which you want to show on Tabs
Below is the screenshot of how you design it using your storyboard
And here is how it works
Deselect Hide bottom bar on push as below :
Or programatically :
yourViewController.hidesBottomBarWhenPushed = NO;

ios Tab Bar Navigation

I am wondering if it is possible to have a view controller in an iOS app that has a tabbar # the bottom with links to other view controllers but no tab for the current view itself?
Ideally what I would like to do is have a view controller A with a tab bar to views B and C. When navigating to page B or C you would see the B/C tab selected in the tab bar. When navigating back to controller A you would not see the tab bar, but once navigating back to view B/C it would show again.
Not that should matter but I am using Xamarin for development.
You should be able to. You add a UITabBar to ViewA. You can then add ViewB and ViewC as UITabBarItems to the UITabBar.
You would need a button in ViewB and ViewC that leads back to View A to get back to it (since ViewA will not be listed in the tab bar).
You can NOT use a UITabBarController for this. UITabBarController does not allow for customizing the UITabBar like this.

Implementing a slide-out menu bar after a login screen in xcode

I have been following the appcoda tutorial (http://www.appcoda.com/ios-programming-sidebar-navigation-menu/) on how to implement a slide-out menu bar for my app using SWRevealViewController. I am wanting to show the slide out menu after the user has logged in.
My root view is the login page. I created a reveal view controller like the tutorial, and put it after the login page. However, when I get to my root view, it displays a back button instead of my slide out bar. In the console, I am getting errors such as "Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted." and "nested push animation can result in corrupted navigation bar".
I have attached an image of my storyboard. Would I need to implement another navigation controlller in the storyboard?
When you navigate from your login View controller to SWRevealViewController, you should hide the navigation bar, which covers the other navigation bar inside SWRevealViewController.
What I did is to hide the first navigation controller's navigation bar in prepareForSegue function of login page controller.

UINavigationController swipe to go back issue

I am creating NavigationController app which contains login and other pages. I am hiding navigation controller in login page and displaying in other pages. I have back/logout button on the left side of the second screen. when i try to drag from second screen (i am not full swipe to the login screen), navigation bar in second screen becomes hidden. It never appears again on other pages. I need to go back to login and push to second view to make navigation bar to show. When i click back/logout button instead of swipe, it works.
Any idea on solving this issue
In your viewcontroller that you want NavigationBar visible use this code
-(void) viewWillAppear: (BOOL) animated {
[super viewWillApper:animated];
[self.navigationController setNavigationBarHidden:NO];
}

Resources