Navigation bar changes height after segue - ios

I have an issue with my app that I can't solve. I have a FirstViewController with a button. when this button is pressed a SecondViewController is pushed. The issue is that the navigation bar changes its height in the secondViewController like (GIF above)
I didn't write code related to the navigation bar, I checked everything I could think about and tried to delete the segue and re-add it. How can I solve that?
The only thing I found is this answer but it didn't work for me

It looks like it is making space for a 'prompt' message that appears above the navigation bar as your GIF shows. As you've said you haven't added any code also check the storyboard in case you have entered just a space (as we obviously can't see any text) in the navigation bar prompt box as shown below. Click navigation bar in your view and look at the inspector:
If there is obviously no space, add text and re-delete it.

Related

How can I remove the gap on top of the navigation bar?

The gap is somehow conected to the back function. If I pull down the navigation bar the app returns to the last view, but I don't want the option to go back a view.
I don't know where to search for it.
if the picture doesn't work. Here is the Link: https://www.dropbox.com/s/3tse4oehn6o47bw/IMG_9159.PNG?dl=0
Try setting the UIViewController's modalPresentationStyle property to .fullScreen.
https://developer.apple.com/documentation/uikit/uiviewcontroller/1621355-modalpresentationstyle

How to completely remove back button from navigation bar?

For some reason I'm adding left and right buttons to the navigation bar as its subview instead of using navigation item. When pushing a view controller, I'm setting its navigationItem.hidesBackButton to YES so that the ugly looking blue 'back' button will not show up. The problem I'm facing is that, after tapping my own back button, while the currently showing view controller being popped --- I mean during the animation of the 'pop', I can see a '...' in the navigation bar moving right along with the popped view controller. And, I DON'T want that '...' to appear for even 0.0000000001 second. What may I do now? Any hint would be appreciated.
Note:Problem solved with just comment. But posting this as answer so that It will help someone else having same issue.
I too had same problem with navigationBarButtonItem while adding custom barButtonItem to navigationBar in storyboard. If you are also using storyboard then just set navigationBar tint color as clear color in navigationController. By setting clear color, that weird default navigation back button will not appear anymore.

Xcode - replace navigation bar with toolbar on show segue

This is what I wish to do.
---- Segue : show ---->
on the destination page, I want to hide the tab bar from the previous page and show the toolbar instead.
When I check "Hide bottom bar on push" on storyboard, the tool bar on the destination page disappears as well.
I think you should change the title of your question since you want to replace the tabBar with a toolBar and keep the navigationBar. At leas this is what I understand from your sketch.
As for the question, have you tried hiding the tabBar in viewWillDisappear in your first view?

UIBarButton placed in toolbar instead of UINavigationBar

I'm developing a (so far) simple iOS application using storyboards.
At one place in the storyboard, I have:
Navigation controller -> Table View (prototype content) -> Regular view
The "regular view" is accessed from a + (PLUS) button in the navigationbar in the table view. In the "regular view" I would like to have a save button in the NAVIGATION BAR. However, when I drag it from the object library to the "regular view" it appears in the TOOLBAR (at the bottom of the screen) instead of in the NAVIGATION BAR. I have not found a way to move it, or found any settings where I can change it. I'm not sure if there is something constraining me from putting a button there or if XCode just mess with me. (I'm new to iOS programming)
Notes:
In the "regular view", I have a back button and a title. According to the design guides I should be able to have one more button.
Thanks for any help!
If anyone faces this problem, I did the following:
I couldn't add a Bar button because there were no top bar in that view. First I tried to put a Navigation Bar in the view, but Xcode crashed. Then I tried to put a Navigation Item, which worked. After that I could place my bar button in the top bar.
What I don't understand is why I could put the Add (+) button in the previous view, since that doesn't have any navigation entry either, but I'm guessing it's since that view was the root view controller of a Navigation Controller. Someone else can maybe give a more detailed answer.
There isn't any solution for this so far. There are however some workarounds for this problem.
Check this pretty cool answer by #Shimanski:
https://stackoverflow.com/a/20419513/2082569
& also this by #ecotax:
https://stackoverflow.com/a/17019667/2082569

Wrong status bar height while editing moreViewControllers

I have an iOS app with a "More..." button at the UITabBarController.
When I am hitting "More..." the new view appears that has an "Edit" button
on top right. Clicking "Edit" shows the view in Edit mode, see at the attached image.
The problem with the edit mode is that the "Done" button is shown below the correct position (see the green arrow) or to put differently the bar takes more space than it should be? Why that happens?
"Done" should be on the top right position and the bar should have less height. I guess that I need to change things in
- (void)tabBarController:(UITabBarController *)tabBarController willBeginCustomizingViewControllers:(NSArray *)viewControllers
{
}
but I don't know what exactly happens here.
Code at iOS8.
This looks like a navigationbar with prompt. Maybe the presented viewcontroller inferred this property in your storyboard/XIB-File.
More tab is default behaviour of Tabbar controller, but your the image shows something is modified. Refer image. If you are implementing default method of UINavigationController in category. Do remove it and build again.

Resources