像天气一样制作透明的stickyHeader iOS [英] make transparent stickyHeader like weather iOS
问题描述
我想在 iOS 中创建像天气应用程序一样透明的粘性标题,因为我的标题是透明的 view
在标题下,但我不希望其他内容在我的标题下方可见.(您可以看到星期五"位于标题下方并将隐藏,但标题是透明的).您可以在天气应用程序中检查动画和此行为.
我试过了:
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 :
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...
这篇关于像天气一样制作透明的stickyHeader iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!