add hidden elements to table view controller - ios

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.

Related

bottom selection view in iOS

I need to select a bottom horizontal list of items. and the data should be changed for each item for selection(like bottom navigation)
I tried with collection view but it's​ not working
It sounds like what you are looking for is the UITabBarController.
The tab bar interface displays tabs at the bottom of the window for selecting between the different modes and for displaying the views for that mode. This class is generally used as-is, but may also be subclassed.
Each tab of a tab bar controller interface is associated with a custom view controller. When the user selects a specific tab, the tab bar controller displays the root view of the corresponding view controller, replacing any previous views.

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:

Cannot move Navigation Bar above tableview Cell

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.

TableView as subview with navigation controller

I would like to have a view (one of five tabbars) with some subviews (labels, images and such) including a table view, so that the table view will only take up half of the screen (similar to this thread Add tableview as subview to view?). I have set up the views controller as tableview delegate and data source, but how can I use navigation with this table view (uinavigationcontroller)?
Clarification:
I started out with a tab bar based app, and wanted to have one of the tab bar views to have some labels in to top and a table view in the lower half of that view. I solved it myself, see below
This was of course simpler than I thought it was. I set up a tab bar controller with some tabs (with individual view controllers). I embedded one of the view controllers in a navigation controller (using the menu Editor -- Embed in -- Navigation Controller). Added the labels and a uitableview (through Storyboard) to the view and hooked up outlets for the labels and the table view, as well as setting the view controller as delegate and data source (UITableViewDelegate, UITableViewDataSource).

UINavigationBar with Search icon - push modal search view when clicked

I am creating a Navigation-Based application. The nav bar has a search icon; when it is clicked I push a SearchViewController onto the navigation controller (containing a search bar and tableview).
I am hiding the table view when the search view loads in an attempt to have the previous view (the view from which the search icon was selected) show behind the search view, but it appears that the navigation controller is removing this view. If I add the search view as a subview on the appDelegates's window I can see the previous view behind the search view, but the app crashes when I click in the search bar (it doesn't appear to give control to the view controller attached to the search view).
I am looking for any suggestions on how to achieve my desired result?
Thanks.
it sure is late as a response... but uinavigationbar's push view...
pushes a new view controller, removing the old one from the active window...
if you want to have a search controller behave like that, you should use a UISearchBarController and set it's search bar as header of your original table view..
the searchbar controller will show and hide the search result table view, if you want the old table to be shown, you should change the table on the search bar, so it's transparent first.
Pushing a new view is not a solution because you totally change the old view (remove it from the window)
greetings

Resources