How can I check to see whether an indexPath is valid or not?
I want to scroll to an index path, but I sometimes get an error if my collection view's subviews aren't finished loading.
How can I check to see whether an indexPath is valid or not?
I want to scroll to an index path, but I sometimes get an error if my collection view's subviews aren't finished loading.
Perhaps this is what you're looking for?
- (UICollectionViewCell *)cellForItemAtIndexPath:(NSIndexPath *)indexPath
Return Value: The cell object at the corresponding index path or nil if the cell is not visible or indexPath is out of range.