简体   繁体   English

如何使每个 UITableViewCell 在滚动 UITableview 时捕捉到顶部

[英]How to make each UITableViewCell snap to top on scrolling of UITableview

I would like to achieve the following functionality.我想实现以下功能。 I have an UITableView which consists of UitableViewCells with images of various heights.我有一个 UITableView,它由带有不同高度图像的 UitableViewCells 组成。 When i slide up with my finger i need to stick the next UITableViewCell that comes up from the bottom to the top of the UITableView. If i scroll again i need the next UITableViewCell to stop to the top of UITableView and so on.当我用手指向上滑动时,我需要将从底部向上的下一个 UITableViewCell 粘贴到 UITableView 的顶部。如果我再次滚动,我需要下一个 UITableViewCell 停止到 UITableView 的顶部,依此类推。 If i slide down the previous UITableViewCell should stick to top and so on.如果我向下滑动之前的 UITableViewCell 应该坚持到顶部等等。 How can i achieve this functionality?我怎样才能实现这个功能? Any example or help appreciated.任何示例或帮助表示赞赏。

You can achieve this using paging in UICollectionView您可以使用 UICollectionView 中的分页实现此目的

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使UITableView中制作的每个单元格的自定义UITableViewCell的高度动态化? - How to make the height of custom UITableViewCell dynamic for each cell made in the UITableView? UITableView滚动时如何维护UITableViewCell状态? - How to maintain UITableViewCell state when UITableView scrolling? 如何基于UITableView滚动动态调整UITableViewCell的大小? - How to dynamically resize UITableViewCell based on UITableView scrolling? 滚动到UITableView的底部(UITableView在UITableViewCell中) - Scrolling to bottom of UITableView (UITableView is in a UITableViewCell) 如何检测哪个UITableViewCell在UITableView的顶部 - How to detect which UITableViewCell is at the top of a UITableView 如何使 UITableView 滚动更快? - how to make UITableView scrolling faster? 如何滚动到特定的UITableViewCell顶部到UITableView顶部不居中? (2张gif解释) - How to scroll to a specific UITableViewCell top to UITableView top not center? (2 gifs to explain) 当我滚动 tableview 时,如何使 headerView 滚动(不停留在 tableview 的顶部)伴随 UItableViewCell - how can i make headerView scroll (not stay on the top of the tableview ) accompanying with UItableViewCell when i was scrolling tableview UITableView中每个UITableViewcell的SwitchView - SwitchView for each UITableViewcell in UITableView UITegmentedControl在UITableView的每个UITableViewCell中 - UISegmentedControl in each UITableViewCell of UITableView
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM