问题
i want to create transparent sticky header like weather app in iOS as my header is transparent view goes under header but i don't want other content visible bellow my header. ( you can see "Friday" goes under header and will hidden but the header is transparent).
you can check the animation and this behavior in weather app.
i have tried :
CSStickyHeader
回答1:
This is done with a combination of various scroll views and table views.
It looks like the whole screen is contained in a UIScrollView. The "header" is just a UILabel that moves depending on the content offset of the scroll view.
The time bar with "Now", "02", "03", ... Is probably a UICollectionView inside the main UIScrollView.
The section underneath that is a UITableView with all the day information. This is also embedded inside the UIScrollView.
The scrolling is then managed by the main UIScrollView and passed down to the UITableView.
However, when the tableview scrolls it is not going underneath anything. The content is being cut off because that is the top of the UITableView.
Then the entire thing is also embedded inside a UIPageViewController to manage the pages.
Something like this...
来源:https://stackoverflow.com/questions/33010199/make-transparent-stickyheader-like-weather-ios