Tab bar not visible on Tab Bar Controller on reverse Segue operation - ios

So, I am still in a learning phase of iOS programming using Swift and got stuck in one issue.
I have a Tab bar controller with options in the tab bar at the bottom.
In one of the tab pages, I have table cells, on click of each, I move the user to a WebView (Embedded in a UIViewController).
On the webView I have placed a back button, which is linked to the main Tab Bar Controller through a segue.
I am able to come back to tab bar controller successfully, but after coming back the tab bar at the bottom does not show.
Also, how can I remove the "
I have attached the main.storyboard screenshot for reference.Main Storyboard flow

I got it working by using the Segue type as "Show Detail" instead of just "Show".

Related

Changing tabs on Tab Based Application Pushes UI Elements Down

I have a tabbed based iOS application. The fourth tab is linked to a UINavigationController. When I navigate to the home tab from the fourth tab, the UI elements of the home tab are pushed down. However, if I rotate the phone to landscape and then back to portrait, everything has moved up and is in the correct place.
In Storyboard, I set the top bar to none. I have the UINavigationBar hidden in the fourth tab/view controller before I navigate to the home tab.
Why would it be that the rotation fixes the constraints? How can I fix the UI elements such that they are not pushed down in the first place?
Here is a screen shot of my storyboard:
Your question doesn't really make sense. A 4th tab would not be embedded in a navigation controller. Instead, the 4th tab would link to a navigation controller. When you first select that tab you'd see the root view controller and it's navigation bar item. If you pushed a new view controller it would get pushed onto the navigation controller in tab 4. If you switch to one of the other tabs then the navigation controller will be swapped away and it's navigation bar will no longer be visible. Swap back to tab 4 you'll see it again, complete with it's navigation bar.
I created a sample app in order to confirm what I'm describing, as I haven't used tab bar controllers a lot, and not in quite a while I can upload the project if you really need to see it. It only contains a couple of lines of code (to implement the button on the navigation controller's view controller that creates and pushes a new view controller.)

Tab Bar Disappearing After a Segue

I looked at the following two resources: Tab bar disappears after segue and My Tab bar controller disappears after a push segue. However, both of them are in Objective-C and they don't seem to address the issue that I am having.
Here is my Main Story Board:
Zoomed in is:
Now, let's call the view controller that has Sign Up and Log In VC1 and the one with the Facebook button, VC2. When I go to VC1 from the Tab Bar Controller, everything is good. I have the tab bar on the bottom of my VC1. And I tap Sign Up and the tab bar is gone. Which I want. And when I go back to VC1 (there is a navigation bar on VC2 with the button cancel that I programmatically added in, and when clicked on, takes me to VC1), the tab bar is gone. But I want the tab bar there.
Some people have suggested me to use a navigation controller. But I do not want to use it because I don't want the tab bar to appear when the user clicks on Sign Up. And, the navigation controller only allows for right to left and left to right segues and I want custom segues (I tried customizing the segues for a navigation controller and it caused a crash for me).
So my question is, does anybody know how to keep the tab bar on VC1 AFTER going to another View Controller WITHOUT a tab bar, and going back to VC1 WITH the tab bar?
Sorry for the long post.

Dragging Bar Button Item to Navigation Controller fails

I am following a tutorial on Udemy about Navigation Controllers.
The instructions are to drag a Navigation Controller onto the storyboard, and then drag and drop a Bar Button Item on the right of its navigation bar to segue to another view controller.
However, when I drag the Bar Button Item to its would-be position on the navigation bar, no drop-zone gets highlighted, and the button gets added to a random tab at the bottom of the screen.
I have tried finding references to this problem but all solutions are programmatic and given the wysiwyg nature of iOS development I would like to solve it through XCode UI.
Is there some setup I must change or is this an XCode 7 discrepancy?
Try to add a ViewController and then in Editor -> Embed in -> NavigationController. Then it should work.
I have solved my problem by dragging the Bar Button Item into the Document Outline, below Root View Controller.
This automatically creates Left Bar Button Items and Right Bar Button Items, which gives you an opportunity to drag the Item in the section of the controller you like.

iOS: TabController not showing with Navigation Controller

I have an app with the start screen consisting of a table menu main which links to 4 different views, then three options to information pages.
Once on any of the main menu options are chosen, the view is shown with TabBar at the bottom of the main menu options. While the nav bar at the top has a back button leading to the main menu.
I built the storyboard which goes from a table view select to a single page. After that was working and passing data, I embedded the single view into a Tab Bar Controller and added a second page. It seems to be working as I would expect however the Tab Bar is not visible on the screen.
Can please anyone help?
I have added an image of the storyboard below:
Get rid of the navigation controller. There is no deed for it so far. Make the tab bar controller your root view.
If you need a navigation conroller within a certrain tab, or some or all of them, then add navigation controllers to those tabs (to the right in your storyboard).

How to go from a single view to a tab bar view

need some help here
My problem is, my app starts with a single view, it shows a menu made with buttons that takes me to different places, one of this places is another kind of menu, but this menu is a tab bar menu, so the thing is, I made a new file with its .xib, I added the tab bar controller, and i Linked all the sections of my tabs with its viewcontrollers...
this means that I have my first menu ready, I have my view controllers ready, I have my menu on the tab bar ready....
so my problem is...
how can I go from my single view (the first view that I see and that doesnt include a tab bar), to the new screen with tab bar controller in it after pressing a button???
help me please
Note: I'm using XCode 4.2 and I'm not working with storyboards (requirements of the app)
You have three options to show your viewController content :
1.using presentModalViewController:
2.add the viewController view as a subView to the current viewController. in your case : [singleViewController.view addSubView:tabBarViewController.view];
3.or if your simple ViewController is the navigation root viewController you can push other viewControllers to its navigation stack. (as #roronoa zorro described).
You might have added all the next viewControllers on the taBarController so if you have want to tabbar on to next screen you simplr have to push the tabbarcontroller on the navigationcontroller.
[self.navigationController pushViewController:TabBarControllerObj];

Resources