Navigation bar View Controller is twice the size as others - ios

I have a multiple View Controllers embedded in Navigation Controller and one of my navigation bars is twice the size(extends down twice as much) as every other one. I want all of these bars to be the same size, but can't find anyway to change the size in Inspector. There are no bar buttons on this Navigation Bar. Any ideas for a quick fix w/o having to rebuild this VC?
Thanks

Default UINavigationBar have a height of 44 points and it can't be changed. I think you have a constraint issue: select your wrong sized UINavigationBar and on the top right corner, in the "utilities", select "size inspector". Then, have a look at the severals constraints, edit and/or delete some.

Related

change in vertical space of top element in viewcontroller

I have a view controller in navigation stack ... whenever after loading the view controller a change happens in vertical space of top element.
I don't understand why it happens ..
I have set top 5 for the top element of the view controller to the superview
I couldn't fix the problem no matter what ... status bar , top bar ,bottom bar,size are inferred
Info.plist I have set viewcontrollerbasedstatusbarappearance as no and I am setting the status bar as light content in app delegate once..
The problem that menioned not happens with all the view controller only with some viewcontroller it happesn
Thanks for any help
I think that you gave constraint like that,
So, change it as per below,
I hope it will work.
First, click on viewController in storyboard.
So, you will see at a right side corner is like this.
After that, Untick Under Top bars checkbox like that,
I hope this will work.

UIView inside UIScrollerView displays with -64 offset

I'm trying to create a form that will be larger than the screen size and I've decided to use a view inside a scrollerview, then I'm adding the rest of the UI widgets (textfields, buttons, etc.) inside the view.
The view displays and scrolls, but no matter what I try, it displays with a vertical offset of -64 below the navigation controller bar. Once there the view will happily scroll up down.
I want the view to anchored at the top, just below the navigation bar, and then scroll down.
I am using IB.
Lots of time researching and not many answers that have worked for me. UIScrollView seems to be like one of those dirty secrets the whole iOS world seems to avoid....
Thank you for your help.
You can fix this in the storyboard
1- Select the view Controller
2- GO to attributes inspector
3- Uncheck adjust scroll View insets
For your view controller, in the storyboard uncheck the option to extend edges under top bar.

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.

UIView added to ScrollView not fitting full screen with Navigation bar at the top

EDIT: Small update to my issue, what i did as a solution for now was obviously just having my scrollview white. This fixes my issue, but my real curiosity was to why exactly the content view was doing what i explained below. Also still curious to what common practice formatting is when adding a scroll view to a VC with a navigation bar.
So i am a bit confused with what is going on here. I have a VC with a navigation bar at the top and i need to add a Scroll view to it. So when i did that i stretched it to just below the navigation bar at the top of the screen, then added constraints. (I also made the ScrollView background red so i could differentiate it from the content view)
Secondly i added a UIView which i named Content view and i stretched it to the exact same position as the Scroll view. Then added constraints for that as well. (No objects were added yet)
I then ran the app to check how it looked and i noticed that under the navigation bar my there was a big chunk of red, meaning the Scroll view was full screen in the correct position right below the nav bar, but my content view was not.
A couple things i did to fix this was
I extended the Scroll view all the way to the top of the VC, past the nav bar, but when i ran the app i could see red behind the nav bar, which i figured meant it was not right.
I extended just the content view to the top of the VC, but this did not seem right to me either, even though both seemed to fix the problem.
So my questions are:
When adding views in general to a VC with a nav bar at the top should i be extending those views only to the bottom of the nav bar, or all the way to the top of the VC?
I am new to Scroll views as this is my first time dealing with one, am i missing something in this situation? Or doing something wrong?
Your help is greatly appreciated, thank you.
1) Move the scroll view all the way up and beyond nav bar.
2) Have the scroll view match the height of its parent.

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