UICollectionView get range between two NSIndexPath objects

506 Views Asked by At

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?

1

There are 1 best solutions below

2
On

You can use the API: numberOfSections and numberOfItemsInSection to get the all index path range, so you just enum the two index path value, use the above data.