简体   繁体   中英

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. 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. If i slide down the previous UITableViewCell should stick to top and so on. How can i achieve this functionality? Any example or help appreciated.

You can achieve this using paging in UICollectionView

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM