Navigation Bar is too small - ios

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.

Related

Implementing Safe Areas for Tab Bar Controller and iPhone X

What I'm trying to do: place the tab bar at the bottom of the iPhone X display where it belongs, and also put the navigation bar at the top of the display.
I've been trying to accomplish what I thought would be a straightforward task of using Safe Areas in the storyboard to position the tab bar near the bottom of the iPhone X's display. I'm missing something fundamental.
I've read a lot of writeup about how to do this, including this one. It includes a screenshot of a tab bar control scene that looks like this:
But I can't create a view inside my Tab Bar Controller to put my tab bar item in, as the article mentions. It's my understanding that I'll use the safe area of the view that should contain the tab bar item. But it won't let me put a view anywhere except outside the Controller view. I've tried using "embed" - but all options are greyed out.
Same goes for a navigation controller to move a navigation bar to the top of the display.
The funny thing is that IB renders it in the right place, but on my device, the tab bar is way above where it should be (and the navigation bar way below).
I have "Opens in" set to "Latest Xcode (9.0) and Builds for iOS 11.1 set in the scene's "Interface Builder Document", and "use Safe Area Layout Guides" is checked. I'm not using any custom classes for my tab bar controller or tab bar. I'm using XCode 9.3 and iOS 11.3.1
What's the simple thing that I'm missing? Thanks in advance.
The article explains how to adapt your app if you're using a custom navigation bar or a custom tab bar.
If you're using the standard navigation bar or tab bar then you have to make sure it's top or bottom (depending on the element) constraints are connected to the superview and not the Safe Area layout guide. UIKit makes sure these elements are correctly rendered with spacing at the top or bottom on an iPhone X device. Check out this screenshot for clarification.

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.

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.

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

Xcode 6 Navigation Bar Constraints Issue

I am currently working on a basic app that has many single view view controllers. I am trying to add a navigation bar to one of my view controllers, when using the "Suggested Constraints", I can see nothing. When the only restraint on the Navigation bar is a center horizontal, it shows up but I think it is too long for the screen. When I tried to add a button on the left side of the Navigation bar, it would not show up in my app because the navigation bar does not have the correct width. I know I have the wrong constraint setup, please help.

Resources