AMScrollingNavbar
AMScrollingNavbar copied to clipboard
How to move up Toolbar and hide it with navigation bar?
navigationController.followScrollView(table, followers: [tabBarController.tabBar, toolbar])
This will make navigation bar hide, but Toolbar still on the top. How to hide the Toolbar when scroll up?
I propose adding a new property named downwardFollowers or similar where would try to move those views towards the bottom when navigation bar hides.
Thoughts?
@attheodo sounds good, more on that, we could probably encapsulate the view in a struct with the direction, something like
enum FollowerDirection { case up, down, left, right }
struct Follower {
var view: UIView
var direction: FollowerDirection
init(view: UIView, direction: FollowerDirection) {
// ...
}
then:
navigationController.followScrollView(table, followers:
[Follower(view: topBar, direction: .up),
[Follower(view: bottomBar, direction: .bottom)]
)
This could be fairly easy to implement and a good starting point if someone wants to contribute.