Cannot move Navigation Bar above tableview Cell - ios

I have added a table view controller that has a table view cell and when I try to add a navigation bar to the top. However when I try to add the navigation bar, it is not getting placed above the table view cell. I have tried it in both ways i.e. by trying to place it in the UI view (didn't work) and also in the Document Outline view (didn't work). Any suggestions on what I am doing wrong here? I have attached the screenshot for your reference.
Cheers.

From the outline view, make sure your Table View Controller is selected.
Then go to the Editor menu, and click on the Embed In submenu, and choose Navigation Controller. You have your navigation controller pointing to your tableview controller with a relationship built in.

Related

Navigation bar breaks in Tableview / detail view inside Tab bar controller

This is a bit of a tricky one to explain here so I'm hoping the screenshot of the storyboard of the app I'm trying to build helps to clarify what I'm trying to do.
Basically the apps starts with a nav controller and table view, when you click on a cell in the table view you go to a tab bar controller with three tabs, each tab view has its own navigation controller and subsequently there is a navigation bar on each of them, so at this point there is a back button on all tab views which takes us back to the initial table view.
The first tab view simply has some text, the next has a table view with several table cells and the last has a map view with several markers. Both the table cell and the map markers link to a detail view via a navigation controller which shows more detailed information (both via named segues). It's at this point of clicking through to the detail view where the navigation is breaking, the detail page shows no navigation bar although it is there as the title text is set, but there is no back button and it seems that the navigation context / hierarchy has been broken here somehow. The appearance of the storyboard also reflects this as it shows no Back button on the navbar on the navigation controller or the Detail view.
Without initially getting into the code in any real way I am just trying to see if there is any significant reason why these type of structure / hierarchy is just now going to work. So, my main question is does this storyboard structure seem like the correct way to go about what I'm trying to do?
Here is the storyboard:

How to make TabBarController inside another TabBarController in swift storyboard?

I wanna know how to create nested UITabBarControllers in Xcode, I'm using Swift.
My first UITabBarController has two items: Search (UITableView) and Map (MKMapView).
When I hit a cell in my table I wanna go to the second UITabBarController.
This second UITabBarController is the detail page for the clicked cell and must have three items --> Info, Reviews and Contact.
Can anyone explain how to do this? Right now I only have the first UITabBarController and a single view controller for the detail page working.
EDIT: The main problem is that when I nest the UITabBarControllers, my app always shows the items of the first UITabBarController.
Make another Tab View Controller next to it (You should see two tab view controllers on the storyboard), and then inside the Tab View Controller you want the other one in, insert a Container View. After the Container View is in the desired Tab View Controller and sized properly, hold control and drag from the Container View to the other Tab View Controller. After releasing, select embed and you should be good to go! Hope this helps. If it does, please vote this up :)
I found the answer by myself.
Just create a segue between the list view and the second tab controller.
And select on the second tab controller hide bottom bar on push in the attributes inspector.
Drag and drop new tabbarcontroller from stroryboard and from your list view controller ctrl+drag to this newtabbar controller and select show segue. (assuming that you are using navigation controller)

Navigation Item in XIB file is not visible

I'm in XCode 7.2.1 and I am trying to make a view that is reusable and should have some custom elements in the navigation bar.
If I would add a view to my storyboard, connect it via a segue to the navigation controller and make sure there is a "Navigation Item" in the view, I could see the navigation bar and edit my items in it.
If I manually add a Navigation Item to a XIB however I can't see anything. Even if I switch in the simulated metrics settings Top Bar to something else than Inferred or None.
I don't want to use the storyboard, if possible. Is there a descent way to make the navigation item visible and edit it?
Thanks in advance.
I don't think you link your View Controller correctly with Navigation Controller. When you link it, you should choose with root View Controller. If you link it correctly, you don't have to add NavigationItem manually.
By the way, you shouldn't do the customization for Navigation bar directly in xib. All you can do is only to set the Title, Prompt and Back Button text.
Do it in code! I think you won't have different styles for navigation bar in different views, right? That would be too silly.

Keeping a loaded View part of the tabController when the tableView cell is clicked?

I have a tabbed application with a TableView in the FirstView. I want to be able click on a cell in the TableView and load a new view.
Right now, when the cell is clicked I go to the view I want but it isn't part of the tab bar controller (as in I I don't see the two tabs on the bottom) and I also can't get back to the FirstView where the TableView is located.
I have seen tutorials on this but they are all starting from scratch. I already have a lot of content on my FirstView so I don't want to start over.
I think I have to put in a Navigation Controller but I don't know how to do that without starting over and I also don't know where I would put it.
Here is the StoryBoard for my app:
http://i.imgur.com/2YJMMD5.png
I am not sure if I understood what you are trying to do but try to control click from your cell in the Home Table View Controller to your Friend View Controller, this will create a segue from the cell to the view controller so the view controller will be called once the cell is clicked.
Please let me know if this is what you are going for!
All you need to do is select your table view controller, go to the Editor menu, and choose "Embed in Navigation Controller". This will insert a navigation controller between the tab bar controller and your table view controller. Now when you select a cell, you should use a "show" segue to go (via a push) to your new view controller.

add hidden elements to table view controller

I'm new to iOS development and I have being able to solve most of the problems I have, but now I got some requirements and I'm not really sure how to configure it in the interface builder to get the result I need.
Requirements:
Navigation Bar (inherit)
Search bar (visible when swipe down)
Label message and Button (visible when swipe down)
Table view
Tab Bar (inherit)
I started by adding a table view controller to my storyboard, and I'm being able to populate the table view. So I have:
Table view controller
Navigation Bar (inherit)
Table view
Tab Bar (inherit)
But now I have no idea how to modify the table view controller to add the hidden search bar and the hidden label and button.
I found that a UITableView contains a Header section where you can drop elements in. It solves my first problem. Now I'm trying to hide the header section.

Resources