简体   繁体   中英

UICollectionView get range between two NSIndexPath objects

I am working on a calendar using UICollectionView and would like to be able to select a range of cells/dates.

Is it possible to get all of the NSIndexPath objects between two indexPath's, so that I can highlight the range?

您可以使用API​​:numberOfSections和numberOfItemsInSection来获取所有索引路径范围,因此您只需枚举两个索引路径值,即可使用上述数据。

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