[英]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.