tristanhimmelman / hidingnavigationbar Goto Github PK
View Code? Open in Web Editor NEWEasily hide and show a view controller's navigation bar (and tab bar) as a user scrolls
License: MIT License
Easily hide and show a view controller's navigation bar (and tab bar) as a user scrolls
License: MIT License
After it disappeared and appeared, it starts showing and hiding from the bottom.
basically what I want to add a bool variable/function to reverse what this library already does.
thank sir
Analyzing dependencies
[!] Unable to satisfy the following requirements:
HidingNavigationBar
required by Podfile
Specs satisfying the HidingNavigationBar
dependency were found, but they required a higher minimum deployment target.
HidingNavigationBar works perfectly apart from this one point.
Before implementing:
After implementing:
The navigation hiding functionality works fine but I am losing my initial contentInset values.
tableView.contentInset = UIEdgeInsets(top: 8, left: 0, bottom: 0, right: 0)
Would be a great improvement.
I've used a hack in the meantime:
private func updateContentInsets() {
let navBarBottomY = navBarController.view.frame.origin.y + navBarController.view.frame.size.height + 8
How to hide only extension view instead of both navigation bar and extension view?
Hello,
I updated the pod to latest version and I got this crash on deinit func. It wasn't occur earlier version and I examined the relaese notes.
I saw there is a method added, on v.2.0.0
Commits on Mar 22, 2017 @ANNotunzdY "Remove Gesture when deinit" c0d38c5
deinit {
NotificationCenter.default.removeObserver(self)
if let panGesture = panGesture {
scrollView.removeGestureRecognizer(panGesture)
}
}
"Fatal error: Attempted to read an unowned reference but the object was already deallocated"
Could you check please?
Thank you.
i added one line to line 101:
print("HidingNavigationBarManager deinit")
but the string wont be printed
Hello this is a great library. I have used this on my project. In my view controller i have a collectionView and above the collectionView there is the extensionView and above that there is navigationBar, in the collectionView there is textview in every cell. now when i am trying to show the keyboard, and want to hide the keyboard the extensionView is coming down and there is seeing a black space between the extensionView and Navigation bar. Some one please help me in this matter.
Hi , I have this issue after I convert my project to Swift 3
Calling HidingNavigationBarManager(viewController: self, scrollView: scrollView)
on the view controller does not allow that view controller to deallocate when needed.
Scrolling and pull-to-refresh breaks when I use subclass of UICollectionViewLayout. Any ideas how to fix this?
just as the subject
Whenever I create an extended view on table view controller, it appears on the middle of the screen. Any suggestion? I saw that sample code uses a ui table view, and not controller. It its possible to add extended view to ui table view controller?
Thanks
It seem not working with UIwebview?
I looking for Navbar will hide when scrolling a UIWebview. Can you please give me any ideal.
Thank sir so much!
Hi
can we make stickyExtensionView mode ?
Something like TLYShyNavBar
I have added the the library through CocoaPods and after that I have tried to add the variable of HidingNavigationBarManager but I'm getting this issue
Use of undeclalead type 'HidingNavigationBarManager'
Should I import something else?
Thanks.
Hi, is it possible to hide the status bar along with the navigation bar at the same time? :)
Hi,
I have a UITableView in a UINavigationController. My tableView contains sections headers.
When I click on the cell, I push another viewController. I call
hidingNavBarManager?.viewWillDisappear(animated)
When the user goes back, the section header is hidden below the navigationBar, as if the tableView had not scrolled. Any idea how to scroll the tableview so the header section is not below the navigation bar on appearance?
Thanks
Repro steps:
Set the title of the nav bar, and scroll up slowly. The title flickers.
Nav bar sets the alpha of the bar whenever the nav bar size changes.
How to use this function for view pager
There's a black bar that's left after NavigationBar hides. It blocks the tableView.
Hello,
I installed v0.3.0 and it does not have the onForegroundAction
option. the source code doesn't have the line:
//Options
public var onForegroundAction = HidingNavigationForegroundAction.Default
Could it be the wrong version being pushed?
pod install log:
$ pod install
Updating local specs repositories
CocoaPods 1.1.0.beta.1 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Analyzing dependencies
Downloading dependencies
...
Installing HidingNavigationBar (0.3.0)
...
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 31 dependencies from the Podfile and 36 total pods installed.
the source code example can not run in Xcode7, by the way, how could I use HidingNavigationBar in the project write by OC ? thx!
When you scroll quickly, sometimes the nav and extension view remain on the screen when it should get pushed off the screen. It has to be a quick flick/scroll to make this happen.
oh, the nav bar appears, this is what i dont expected
Is there a way to keep the extension view sticky?
I want hide only tabbar
is there a way to this feature?
I want to know the status changes.
This one always returns not hidden
self.navigationController.isNavigationBarHidden
On line 348:
let contentInset = UIEdgeInsets(top: top, left: scrollViewContentInset.top, bottom: scrollViewContentInset.left, right: scrollViewContentInset.right)
Looks like you're setting left
to top
and bottom
to left
. Is that intentional?
If you using HidingNavigationBarManager in controller witch is in array "viewControllers" of UITabBarController, you will have a huge white offset in the bottom of scroll.
https://drive.google.com/file/d/1vPbndd4bXcUN0zb4QD9KeM_uN0mA-_aF/view?usp=sharing
https://drive.google.com/file/d/1lucODLIBrHriOiUdSG75-KJZrMmXIVDp/view?usp=sharing
Reason of such offset is unreal bottom offset value. It's become bigger and bigger during you are scrolling.
https://drive.google.com/file/d/1umARWIkkudNcdngHQ7BssZnQxmspzD6L/view?usp=sharing
I found reason of this bug - this issues becomes visible when "scrollView.contentInsetAdjustmentBehavior" set to any other value than ".never". If you set "never", content of scrollView goes under tabBar and navigationBar - so it is bad solution. I opened source code if library and found 3 lines of code that do this bug.
https://drive.google.com/file/d/1OsRUSUOYalhKnRTextEqdrVhJ9VelNzx/view?usp=sharing
If you comment this 3 lines - there aren't huge white offset no more, in the top everything is great on iPhone X and traditional iPhones. Only issue - now there is 49 points of gap for tab bar.
So I see 2 solutions:
P.S. #1 Something strange is going on this piece of code:
https://drive.google.com/open?id=1qTWlhopf1DN2M3ByQXVd7PGZ-uoj3aQp
P.S. #2 My quick fix was add this code at "func handleScrolling()"
if scrollView.contentSize.height - scrollView.contentOffset.y < scrollView.frame.size.height {
UIView.animate(withDuration: 0.2, animations: {
_ = self.tabBarController?.expand()
})
}
When I installed Hide Navigation Bar in iOS 11 my whole app screen gone blank as soon as I removed the integration all screens are intact now.
Getting wierd navigation issues with iOS 11, doesn’t hide the navbar
If I use HidingNavigationBarManager on UICollectionView or UITableView with a refresh control, the HidingNavigationBarManager totally breaks the refresh control.
The refresh becomes jitty and is even sometimes hidden.
I am guessing this has to do with the fact that the HidingNavigationBarManager is doing stuff to the collectionView inset.
Maybe implement a listener to "kill" the HidingNavigationBarManager during refresh…
NOTE: I am implementing
self.hidingNavBarManager?.refreshControl = self.refreshControl
This happens on a UICollectionView with a custom layout. I haven't checked on a standard layout nor on a UITableView
I haven't had time to figure out why. Creating this issue to track it, though.
Though it would be a little difficult to judge, as following gif when I scroll the table view, the height of the table view gets short somehow.
I'm using swift 2.0 and xcode 7.1.
These are my codes.
let rect = UIScreen.mainScreen().bounds;
tableView.frame = CGRectMake(0, 0, rect.size.width, rect.size.height)
hidingNavBarManager = HidingNavigationBarManager(viewController: uiViewController, scrollView: tableView)
if let tabBar = self.navigationController?.tabBarController?.tabBar {
hidingNavBarManager?.manageBottomBar(tabBar)
tabBar.barTintColor = UIColor(white: 230/255, alpha: 1)
}
conflict with header tableve and auto hide header tableview with image
How to reproduce in the demo project:
Add this to HidingNavViewController.swift:
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
UIApplication.sharedApplication() .setStatusBarHidden(true, withAnimation: UIStatusBarAnimation.Slide)
}
and then go to Hiding Nav Bar, scroll down a bit so that the bar collapses, and tap on a row.
The bar will then expand but without resetting the subviews' alpha values.
Is this a quick fix? I'm not very experienced in Swift.
Thank you!
Not scroll up or tap the top status bar.
when i scroll tableView up and down
naviBar and tabBar will hide forever
and there are a white frame in bottom of tableView
Is it possible to hide the extension UIView only? I would like to keep the navigationBar and only hide the extension UIView.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.