bryankeller/BLKFlexibleHeightBar

Can we display the FlexibleHeightBar when user just scroll up, not until to the top?

liuxuan30 opened this issue · 7 comments

Can we start to display the FlexibleHeightBar when user just scroll down, not until to the top? Ideally, when user scrolls down, the height bar will continue to shrink and disappear, and whenever an user start to scroll up, it will trigger the height bar to start expand based on offset(progress), not until user scroll up to top.

I think the behavior you're describing can be found in FacebookStyleBehaviorDefiner. Let me know if that works for you.

Nice! I was looking at cash and forgot the facebook style. Another request is, if I choose this facebook style, can I have a view toggle to top? e.g. in your demo, there is a three column blank view under search bar, I want this blank view stick to top no matter where user scrolls. Can we do that?

Sure! That will be configured when you apply layout attributes to your bar's subviews. My Facebook demo configures that subview to slide up and disappear before the rest of the bar, but you can make it look however you'd like.

I'm going to close this since it sounds like your original issue is resolved.

Could you give the attribute names so I can take a look at it?

I think that https://github.com/bryankeller/BLKFlexibleHeightBar#configuring-subviews will help you. Notice how the UILabel moves up and down with the bar.

If you can figure out where you want your "pinned" view to be at progress == 0.0 and where you want it to be at progress == 1.0, then you can make it look like it's pinned. If you only have a full size and a min size state for your bar, then this can be accomplished with only 2 layout attribute definitions added to your pinned view.

I am trying to write a prototype, could you specify what are the two layout attributes? Thanks!

I kind of figured out what you mean by 2 layout attribute.
It should be the initial layout and final layout attributes you are talking about.