How do I fix the gap between my view and my navigation bar when the call status bar is active? - uinavigationbar

I am using ECSlidingViewController for navigation but I don't believe this is the cause of my problem. Below is an example of my problem.
I have tried using viewDidLayoutSubviews to fix this and I have changed the settings for navigationBar translucency to NO. I thought with proper constraints in my view that auto layout would handle something like this. Does anyone have any suggestions?

In viewDidLoad, add:
[self.navigationController setNavigationBarHidden:YES animated:NO];
[self.navigationController setNavigationBarHidden:NO animated:NO];

Related

SearchController not showing navigation bar

Suppose, I am in discuss view controller and I searched something. Now I switched the tab and now again I get back to this discuss view controller then navigation bar got hidden which i don't want. I tried everything, like hidesNavigationBarDuringPresentation or setHidden property of navigation item, but nothing is happening.
try this
if your current viewcontroller is already embed with Navigation controller, the following code will work
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[[self navigationController] setNavigationBarHidden:NO animated:YES];
}
Note
Present viewcontroller does not embed with UINavigationcontroller, if you want we need to add in manual, see this link once

How to make UIView go fullscreen when entering edit mode

I have a UITableView that renders in the context of a UINavigationController (and maybe even a TabBarController). There is a way to make the UITableView enter editing mode. When that happens I want the table to get 'focused' and the navigation bar and tab bar to go away (the table view has to expand to fill the empty space). Then when editing mode completes, it should all go back to normal. Anyway to achieve this with standard iOS view and controller functionality. Or do I have to start hiding controls and resizing the view manually?
You could use a modal view to accomplish this.
Have a look at the documentation for [UIViewController presentViewController:animated:completion:]
If you just want to show the UINavigationBar and the UITabBar to disappear, you can just use:
[self.navigationController setNavigationBarHidden:YES animated:YES];
Otherwise, you can show an editable version of the UITableViewController and push it onto the navigation stack:
viewController.hidesBottomBarWhenPushed = YES; // this property needs to be set before pushing viewController to the navigationController's stack.
[self.navigationController pushViewController:viewController animated:YES];

How to hide/show custom navigation bar?

In my iOS application, I'm using custom NavigationItem (added to root view from Nib file). For default NavigationItem I can use
[self.navigationController setNavigationBarHidden:YES animated:YES];
to hide them, but I didn't find any way to hide my custom NavigationItem or removeFromSuperview, could somebody please kindly show me some pointers?
Thanks in Advance!
with [self.navigationController setNavigationBarHidden:YES animated:YES]; you hide the complete navbar and not only the navItem. As far as i understand you added the navitem as a subview. You have to keep some kind of reference to the UIVview eg. with a property or a tag and then remove/hide the navItem.
Since you just hide the navBar it is still there. So you can move you views with their frame property.
So I guess you it is enough to move the content views and skip the hiding / removing at all.
you should create outlet for your navigation item and the you can animate/hide by writing code your self

Hide bottom bar on demand

I have a UINavigationController inside a UITabBarController. I'm presenting a sort of popover view using a semi-transparent UIView, but am not calling presentModalViewController or any of the usual methods. I know about hidesBottomBarWhenPushed, but is there a way I can hide the bottom bar (or even betterm slide it out) on demand (just before my subView is added to the navigationController's top view)?
Have you tried setting this property?
navigationController.toolbarHidden = YES;
Or with animation:
[navigationController setToolbarHidden:YES animated:YES];
See answer https://stackoverflow.com/a/9141766/305351 to related question.
Specifically Borut Tomazin's comment and his solution https://gist.github.com/borut-t/6507423.

UINavigationBar moves my view

I have a UINavigationBar that is hidden most of the time my app is running.
however when i was it to show i call
[navigationController setNavigationBarHidden:NO animated:YES];
the view currently showing is resized..
i then unchecked the "auto resize" option in interface builder.
now the view is moved down.
i there a way to load the navbar over the top of the view so it does move my view?
Many thanks
You need to put your own navigationbar by picking from the Library.
use this code and put your navigation bar in the XIB of the view.
[navigationController setNavigationBarHidden:YES animated:YES];
Other wise your view will be come down by 44 points the height of the navigation bar.

Resources