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
Related
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.
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.
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?
The app is UITabBar-based. Search bar is embedded in navigation controller. Although the value of automaticallyAdjustsScrollViewInsets property is YES, the .bottom contentInset of the results controller`s scroll view does not respect tab bar whatsoever.
Stripped-down version of UICatalog sample with demonstration is here: SearchResultsIncorrectContentInsetsDemo on GitHub
Steps to reproduce:
Focus on the search field and perform some search ('o' for example)
Hide the keyboard by pressing 'Search' button
Try to scroll the results up to the bottom
The bottom of the table view content is hiding under the tab bar.
You should turn off "Extend Edges"->"Under Bottom Bars" option in "Search Bar Embedded in Navigation Bar" controller in storyboard
I have the same issue.
The problem with "automaticallyAdjustsScrollViewInsets" is that the results controller doesn't know that it's embedded in a UITabBarViewController - you can see that this is true by checking that the search results controller's "tabBarController" property is nil.
To counter this issue, I've added the bottom content inset manually inside the culprit view controller.
This is by no means a ideal solution, but, since I don't see a way of notifying the controller that it's in a UITabBarViewController (shame the "tabBarController" property's read only :)), it will have to do until a future enlightenment on this matter.
My situation: http://i.stack.imgur.com/KTlVu.png
I have two views right now. From the second view, I want to have a back button that goes back to the initial view. I added a navigation controller and made it the initial view, and the navigation bar appeared for the first view(PlusCalendar). However, I don't know how to add a navigation bar for the second view(AddEventControllerVC) and add a back button that makes it go back to PlusCalendarView. I have looked at several tutorials and none of them surprisingly dealt with this problem. I am also looking at Apple's class reference and I am not sure if I have to initialize the navigation bar again from the second view controller. My questions are..
How come a navigation bar is not automatically added to all of my views?
For the second view, why does the navigation bar seem to be placed at the bottom?
How do I add a navigation bar on top of the second view, and add a "back" button?
The navigation bar was supposed to add the back button automatically. The problem was that the sigue between my first view and second view was set as a "modal popover." When I changed it to a "push" the back button appeared rightfully.
It seems that in model pop, the navigation bar is not record the view controller in its stack. So it cannot known the back track.In your case ,you should custom your navigation items in the second view controller. You can look this example: custom navigation bar