Hiding the tabbar and removing the space
If you're still seeing a black stripe under your hidden tab bar, have you tried to select Extend Edges Under Opaque Bars here?
Make also sure that Under Bottom Bars is still selected. Hope it helps!
How to remove empty space behind the `PTCardTabBar` when it is hidden?
As I said in my comment, you'll need to do some digging into that PTCardTabBarController
code.
I spent a few minutes playing with it, and this might help you out... tried to make as few changes as possible, so I only edited PTCardTabBarController.swift
.
So...
- added Two constraint vars: customTabBar Bottom Anchor and customTabBar Top Anchor
- the bottom anchor constrains the Bottom of the custom tab bar to the top of the "small view". This will be active when the tab bar is showing.
- the top anchor constrains the Top of the custom tab bar to the Bottom of the view. This will be active when the tab bar is hidden.
- added a
showTabBar()
func to show/hide the custom tab bar with optional animation. - in
viewDidLayoutSubviews()
set the frame of the hidden "built-in" tab bar to below the bottom of the view.
Now I can, for example, do this:
if let ptcTBC = tabBarController as? PTCardTabBarController {
ptcTBC.showTabBar(false, animated: true)
}
performSegue(withIdentifier: mySegueID, sender: indexPath)
and then on return:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if let ptcTBC = tabBarController as? PTCardTabBarController {
ptcTBC.showTabBar(true, animated: true)
}
}
I forked that PTCardTabBar
repo and added a complete example here: https://github.com/DonMag/PTCardTabBar-1
White space in place of a hidden tab bar
Thank you for all
I have found the best solution to my problem .
MyImageViewController.hidesBottomBarWhenPushed = YES ;
[self.navigationController pushViewController:MyImageViewController animated:YES];
It gave me the response I wanted .
Thank you for your share
Hiding Tabbar still occupy Space?
You can try this:
yourInnerViewController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:yourInnerViewController animated:YES];
Hide tab bar in IOS swift app
You can simply use this in your ViewDidLoad()
method.
self.tabBarController?.tabBar.hidden = true
For Swift 3.0, 4.0, 5.0:
self.tabBarController?.tabBar.isHidden = true
Or you can change z position of tab bar this way:
self.tabBarController?.tabBar.layer.zPosition = -1
and if you want to show it again then:
self.tabBarController?.tabBar.layer.zPosition = 0
Removing Tabbar from tabbedpage leaves blank space. How to remove it?
Adding following function to the renderer removed blank space from TabbedPage
.
public override void ViewDidLayoutSubviews()
{
base.ViewDidLayoutSubviews();
TabBar.Hidden = true;
var page = View.Subviews[0];
var tabbar = View.Subviews[1];
tabbar.Bounds = CGRect.Empty;
page.Bounds = UIScreen.MainScreen.Bounds;
}
Related Topics
Single Function to Dismiss All Open View Controllers
Change Language of Alert in Banner of Push Notification
Kvo and Arc How to Removeobserver
Xcode 10: Unable to Attach Db Error
Why am I Getting Ibtool Failed with Exit Code 255
Making a Phone Call in an iOS Application
Upload Image from iPhone to the Server Folder
How to Set a Uitableview to Grouped Style
How to Restrict Special Characters in Uitextfield Except Dot and Underscores
Black Screen After Adding Scenedelegate and Updating Info.Plist
This Certificate Has an Invalid Issuer:Keychain Marks All Certificates as "Invalid Issuer"
How to Hide/Show Tab Bar of a View with a Navigation Bar in iOS
Hiding the Tabbar and Removing the Space
How to Use a 'Container View' in iOS
iOS Touch Event Notifications (Private API)