how to make a sticky headerTableView while having numerous headers in sections? - swift

A goal of mine is to have an appearing/disappearing headerTableView - show on scroll up, hide on scroll down. I have tried setting tableView style to plain but then my section view headers are sticky and not just the headerTableView. Does anyone have an idea how to have an always showing/disappearing headerTableView regardless of scroll position (not just when I'm on top)?

Related

sap.uxap.ObjectPageLayout jumping buttons due to scrollbar

Example:
https://plnkr.co/edit/213BfJ4Q0shqBqaK
If there is no scollbar at the 2nd section for you, you might have a bigger screen than me and need to add a few more buttons.
If you set the useIconTabBar property of the ObjectPageLayout to true and have a section that needs scrolling but another that does not, the minimaize and pin button of the ObjectPageLayout Header are displaced each time you navigate between sections.
The scroll bar is across both header and content forcing the header to reajust its center, making the buttons move. This reajustment looks out of place in the otherwise static behavior of the header.
Is there a way to restrict the scrolling to just the content area of the ObjectPageLayout or fix the horizontal position of those buttons?
If there is a need to navigate often between the Sections the displacement can be very irretatiing for an enduser.

How create collectionview header like instagram tags searching one?

Can anyone help me how this header can be implemented? Especially how it works during scrolling? Seems that when I scroll to bottom this header is pushed up like a cell, but when I scroll to top it's static and looks like a view over collection view.
Photos
1) INITIAL STATE
2) SCROLL TO TOP
I believe the header isn't part of the collection view at all, but a sibling, i.e. the both share the same superview.
The collection view is given a large content inset at the top to make room for the header. Then, as the collection view scrolls, the scroll events are captured via delegate method and used to shrink or expand the header to make it appear as if it's sliding beneath the navBar.
(For reasons that have to do with the navBar translucency, it's not actually pushed under the navBar, but that's not immediately relevant to this question)

Section Header of UITableview not pin at the top when scroll up - Swift

Normally, When I create table with style grouped, there are no any problem with section header. when I scroll up, the section header always stay at the top even when scroll pass it. I create one sample tableview using group style, section header not stay at the top when I scroll up like before. maybe do I miss some properties?.
Make sure style is set to Plain not Grouped.
Check below image:

Non sticky header section cell (supplementaryview) on collectionview

Okay so here is the struggle, the default behavior for header section cells is to stick to the top of the collection view frame, did some digging and couldn't find a way to remove this default behavior, if anyone has clues about how to do it, please share.
The main reason for this is that I want to display a header as a UIView on top of the collectionView so if the section header does not scroll with the rest it kinda sucks in terms of UI experience IMO.
Set the flow layout's sectionHeadersPinToVisibleBounds to false.

UIScrollView always bounce upwards and does not show scroll bar in iphone

This is probably simple but I do not seem to get it to work. I have a view and inside it I have a scroll view and inside it I have a view with some labels and a button. the height of the text inside the labels changes according to some condition so I need to scroll down to see it. But whenever I try to scroll down it bounce back up without giving me a chance to view the rest of the view.
Basically, I want when I scroll down, the view to remain down as it normally should. Besides I do not see the scroll bar at all when I'm scrolling.
I know I probably do not understand how scroll views work, so I'd appreciate any help to explain to me the behavior of scroll views.
P.S. I built my whole view in a nib file and this specific setup That I mentioned at the beginning is based on a suggestion from one question I read here.
Thanks, Mohsen
you need to set content size of your scroll view
[scrollView setContentSize:CGSizeMake(360,1000)];
you can make the content size dynamic as per your calculation.