iOS UITabBar position and items - ios

I've created a view and I added a UITabBar dragged from Storyboard.
The problems I'm facing are the following. I'm trying to add more items to the UITabBar from storyboard but can't seem to find any information of how to do that. Any pointers would be appreciated
I'm not using UITabBarController.
Is it possible to decide where to place the tab bar. If I want it in the middle of the screen for testing?
Thanks

here is the steps :
Add a Tab bar to your View controller .
Drag a tab bar item and add it to you tab bar like so
And you are done; By default the tab bar will be added to the bottom of the screen

Related

Put the Navbar fixed while move between tabs

I use the same NavBar in all the views of TabBar, right now I have an Initial TabBarController with five NavigationController and each one with its ViewController.
The thing is that when selecting any section in the TabBar the hole screen, including the NavBar, moves to the selected section.
I need the Navbar and Tabbar to be fixed and only the content in the middle to move when tap to go to some screen.
Hope the description of the problem is clear.
Any ideas what i can do to replicate that behavior?? Thanks!
The reason that is happening is because each tab/view has it's own NavigationController. Instead you need to share one NavigationController with all of the views so that the NavBar isn't a new one every single time
Navigation bar is a part of the navigation controller's view. If you have separate navigation controllers, you essentially have those many navigation bars.
If you just want a single navigation bar / controller and control the content with a bottom bar, you can simply use a toolbar / tabbar (without tabbarcontroller) at the bottom, to navigate / change content

navigation bar not coming common to both screens

This is my slide menu in cyan color on the left and dark on the right is my actual window having the slide menu. i need a common navigation bar for both of them but i am not getting it.
I have attached my slide menu with a navigation bar "embed in" and which furthure is connected to swrevelviewcontroller. what should i do to get a single top navigation bar in a situation where the slide menu is visible and the screen also.
First go to storyboard select view controller then check properties from right side.
Then after you need to set UIBarButton(menu/back) manually in all view controller as per requirement. Might be your problem will solved.

Hide UITabBarController and make view fit

I'm trying to hide tab bar controller when click a button in view, and then show it again when clicking another button. I've checked the code in this link: How to hide tab bar programatically and then expand view to fit but unable to do it.
I need to hide the tab bar controller and expand a UITableView so that there is no empty space where the tab bar is.
Anyone has a solution for this? I'm using Xcode 8 with auto-layout enabled.

iOS storyboards - UINavigationBar not appearing when I add it

I added a UINavigationBar to a detail controller scene, but when I run my app the UINavigationBar does not appear. Why is it doing this ? I have the custom class set to the controller I want it too, but its not appearing, here is a screenshot.
but when I run this app, I dont see the "Title" bar or anything.
To add constraints select your navigation bar and click in the icon as in the picture.
uncheck "constrain to margins" as you want the navigation bar to snap in the boards of the screen, select the up and left red dots lines and add the value 0 to the drop boxes, meaning 0 pixels from the left and top of the screen.
Select Update frames and click in add constraints.
I can see in your screenshot you have other screen with problems (red icon next to the view controller) you should also fix that, click in the icon for more details about the error/warning
I am not sure if I understand what you are trying to do, but try this,
Select the detail view and go to the xCode menu and select editor->Embed in-> Navigation Controller.
I hope it helps
Add constraints to your navigation bar. However, IcaroNZ suggested the best way for navigation

Navigation Bar is too small

I am working on an iPad app and when I try to put the navigation bar on the first view controller, it fits in the main storyboard but is too small (also comes in contact with the status bar) when I run the simulator (as seen in the picture below):
The width and height in the storyboard are set to regular, not sure if it is relevant to this question. How do I fix this?
It looks like you're just adding a navigation bar. Are you sure you don't want a navigation controller?
If you do just want the navigation bar the you need to add constraints to pin it to the left and right of the screen.
Click the "add constraints" button and pin to left right and top.
Click on your view and go to Editor > Embed in > Navigation Controller.

Resources