Comments (7)
@roshanman sorry for late response. Yes, look for "hideBar" method which is hiding the navigation bar on swipe
from youtube-ios.
Thanks, I have noticed the method hideBar
func hideBar(notification: NSNotification) {
let state = notification.object as! Bool
self.navigationController?.setNavigationBarHidden(state, animated: true)
}
In this method, we just hide the navigationbar, I don't understand why when we hide the navigationbar, the tabbar go to the top position automatic.
Thank you.
from youtube-ios.
it's done automatically by iOS. Once you hide the navbar, everything inside the main view goes up with animation.
from youtube-ios.
Why my button do not moved when i hide the navbar ?
from youtube-ios.
Hey @roshanman that's a good question. It depends how you build UI. If your constrains linked with NavBar then it will animate up, otherwise it will not move. Check the attachment.
navBar.zip
from youtube-ios.
Thanks for your help. This method worked.
But in your code
lazy var tabBar: TabBar = {
let tb = TabBar.init(frame: CGRect.init(x: 0, y: 0, width: globalVariables.width, height: 64))
tb.delegate = self
return tb
}()
//TabBar
self.view.addSubview(self.tabBar)
you do have not used constrains for tabbar. really strange!
from youtube-ios.
@roshanman yeah, it was a bad decision. In upcoming update will replace InitWithFrames with constrains
from youtube-ios.
Related Issues (20)
- errors building with carthage... HOT 1
- Programmatically Changing Tab HOT 6
- Application Lifecycle Question HOT 9
- Auto layouts for view controllers are Not Working HOT 2
- Video Player Covers tab bar items when minimized
- Domain where images and other information is pulled from is down HOT 4
- View are only working in 4.7 inch devices. Support other screen size. HOT 5
- REACT NATIVE BRIDGE HELP.
- Navigation Right bar button items not hiding HOT 1
- Auto-layout issue of trending page on 4 inch screens
- swift4
- Layout
- Minimize view can not margin bottom
- [Question] viewWillAppear not working when i selected tab? HOT 1
- Can we put text below icon of each tabBar? HOT 1
- How to change Navigation Bar to Tab Bar?
- Signing Error
- AVPlayerLayer frame doesn't fit into UIView for video player HOT 1
- Fullscreen HOT 2
- Can we make collection view in TabBar to be scrolled if there are many items in TabBar? HOT 1
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 youtube-ios.