Comments (2)
Hi @basilmariano, I am glad you liked it.
If I understand the question correctly, you are making the setNavigationBarHidden:
call in a view controller that uses the shyNavBar? If that is the case, it probably won't work, since you are hiding the navigation bar anyway, why would you want to attach the shyNavBarManager to it?
If you mean the shyManager is attached to the previous controller, it should work, I just tested it myself. Make sure your call is like this:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
}
Cheers,
from tlyshynavbar.
If you are pushing to a view controller that does not have a shyNavBar from a view controller that does have a shyNavBar and you are hiding the nav bar in viewWillAppear of the new controller it will not work. Here is the solution that works great for me.
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
//We have to manually animate hiding the nav bar because TLYShyNavBar prevents
//[self.navigationController setNavigationBarHidden:YES animated:YES]; from animating properly.
//First animate the bar out in viewWillAppear:, then call setNavigationBarHidden: in viewDidAppear:
//This will allow user interaction underneath where the bar would normally be.
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.25];
self.navigationController.navigationBar.alpha = 0;
[UIView commitAnimations];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:NO];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
//Prevents showing the navigation bar when moving to another of the same controller
if (![self.navigationController.topViewController isKindOfClass:[YourViewController class]]) {
[self.navigationController setNavigationBarHidden:NO animated:YES];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.25];
self.navigationController.navigationBar.alpha = 1;
[UIView commitAnimations];
}
}
from tlyshynavbar.
Related Issues (20)
- Not hide nav hide text only
- Navigation bar corrupted (can recreate in TLYShyNavBarDemo)
- Issue when adding/removing navigationItems while navigation bar is contracted
- Fade the entire navbar can not work when use tableview
- the code works not well in pageViewcontroller HOT 1
- Multiple extensionViews
- bug HOT 1
- Nav Bar gets stuck midway through transition state when using the interactivePopGestureRecognizer HOT 2
- When I click on the status bar twice, the effect is different.
- Statusbar is gone / get "overlapped" HOT 4
- TLYShyNavBar not working, UITabBarController HOT 1
- -[UIViewController tly_swizzledViewWillAppear:]: unrecognized selector sent to instance 0x10355e750
- Cannot work on iPhone X. HOT 5
- iOS 11 Large gap above scroll view HOT 6
- iOS 11 Fade no longer works HOT 4
- Is there no way to have navBar in the same state it was it when a view controller was pushed to it?
- Hiding/Expanding navigationbar is not working on ios 11 with xcode 9
- Failed to Render and update auto layout status for MYViewController HOT 1
- Support for iOS 12 and Xcode 10 beta HOT 1
- Extra distance between UINavigationBar and ExtensionView after a rotation. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tlyshynavbar.