UIView automatically moving up when pushed in a SplitviewController from TabbarController - ios

My Single View Application has a TabBar & some Tab contains Splitview. My current scenario is when I pushed a new view controller in my Tab's secondary view controller, it moves up automatically & shows a black bar top of the TabBar. Please take a look at the screenshot below

Select the ViewController you worked on.
Go to the Attribute Inspector.
In Attribute Inspector View Controller section
Unmark Adjust Scroll View Insets (layout)
Checkmark Under Opaque Bars (Extend Edges)
Hope it helps.

Related

How to segue to view controller without the tab bar disappearing from the main view

I need to segue to another UIViewController from my TabBarController without the tab bar disappearing from the bottom of the view.
As you can see in the picture, I want to segue to the colored view when pressing the red button from tab bar controller with the tab bar still displayed at the bottom of the view.
enter image description here
Set each of your tab roots to be a UINativagationController. Then set the current UIViewControllers as the roots of the navs. Then you can segue as much as you want and the tabbar will remain on the bottom.
e.g.
like the bottom flow, you can add another UIViewControllers to the right again.

Remove the gray bar at the bottom of view controller - iOS

The image shows the View controller and the bar I want to remove. And also the structure of the view controller:
Someone told me how to remove the grey bar present at the bottom of the view controller as shown in the image. Unable to select and delete the bar. When I try to add the tab bar in that place, it goes behind the grey bar and becomes invisible.
What do your simulated metrics look like?
Can you get rid of the bar by changing the bottom setting?
Couple of things - if you are using autolayout, just make a constraint to the bottom of the container, with 0 value for the constraint. That will take it to the bottom. Second thing I would add is a zero size table view footer to the tableview.
This is a toolbar that comes with the UINavigationController that the View Controller is embedded in. Assuming you have a Navigation Controller on the storyboard connected to the view controller, select it and in the attributes inspector deselect "Shows Toolbar". If you want to do this in code you can get and set isToolbarHidden on a UINavigationController instance.

Adding a Tab Bar to NavigationController using interface builder, not intuitive at all

I have this ViewController as the root view controller. This VC is embed in a navigation controller. So, the navigation controller is the initial controller.
I have worked millions of times with an app like this.
If I want to add buttons to my nav bar I go to the navigation controller, turn on TOP BAR property to translucent navigation bar and now I can add buttons to the nav bar on my view controller.
But this app is different. I need a tab bar at the bottom too. So, I follow the same logic. I go to the navigation bar, turn on BOTTOM BAR property to Translucent Black Tab Bar, a black rectangle appears at the bottom of my view controller and BOOM, I cannot add buttons to it. Same logic, different behaviors.
If I try to add a tab bar to the black rectangle Xcode will not accept.
I want to add this tab bar to the bottom of the view controller and make it translucent, so the collectionView this controller has will be partially visible thru it.
So the question is: what is the purpose of the BOTTOM BAR property of the navigation controller if it will not accept dragging tab bar items to it? How do I add a tab bar to my navigation controller or to its root view controller using this stuff? Or in other words: how do I add a tab bar to the bottom of a view controller that has a collection view covering the whole are and make that tab bar translucent, so I can see the contents of the collection view passing thru...
The bottom bar of a UINnavigationController is a UIToolbar and if shown the navigation controller should automatically adjust the insets of the collectionView (and other scrollView) to make the content appear under them when you scroll.
I've encountered the problem of adding elements to that bar myself and the only way that I've found is to do that in code accessing the toolbar property of your navigation controller and set the items property with your UIBarButtoItems. As you want to make a segmented controller-like component I suggest an item with a custom view.
I can't answer the first question, but as for the second- drag a Tab Bar Controller onto the canvass the same way you would with a new View Controller. Make this new Tab Bar Controller the initial View Controller. CTRL-drag from the Tab Bar Controller to any of the view controllers (or navigation controllers) for which you want a tab bar button. Select "View Controller" as the segue type. The tab bar button for that segue will appear at the bottom of both the Tab Bar Controller and the View Controller itself, and you can change the text or image by clicking it and opening the Identity Inspector.

iOS - second TableViewController under TabBarController is overlapped by NavigationBar

I have the following storyboard layout:
NavigationController
'-> View Controller
'-> TabViewController
'-> TableViewController1
'-> TableViewController2
The problem is when the second tab is selected, the table view (TableViewController2) appears overlapped by the top navigation bar, despite Under Top Bars being deselected under Extend Edges. The first tab works fine with the same setting.
If I swap the table view controllers between tabs, the problem doesn't swap, it still stays on tab 2.
Anyway to fix this?
I didn't quite get the question, but is Adjust Scroll View Insets checkbox of your view controller selected ?

TabBar in TableViewController is not at the bottom

I am trying to add a tabBar to my TableViewController but it is not a the bottom it just act like a cell
Here is a screenShot:
When using a UITableviewController storyboard scene, every Tab Bar or Toolbar you drag in it is automatically put into the tableView tableFooterView.
If you don't want that, you have to create an UIViewController scene. You will therefore be able to drag your Tab Bar or Toolbar in it, set its auto layout constraints and then add your UITableView in the UIViewController scene (see image below).
However, there is another solution. Select your Navigation Controller scene and go to the Attributes Inspector. In the Simulated Metrics, go to Bottom Bar and select "Translucent Tab Bar" or "Translucent toolbar". Then, select your UITableviewController scene and repeat the previous operation (see the picture below).
If you do so, all controllers following your Navigation Controller will have a Tab Bar or Toolbar (that's another problem that can also be fixed).
Use autoLayout to pin it to the bottom

Resources