Thursday, March 12, 2015

Reminder: iOS's UICollectionView Added an Item Property to NSIndexPath

TL;DR Use the item property on NSIndexPath for UICollectionView instead of row from UITableView 

Just realized I littered a UICollectionViewController with calls to indexPath.row when I should have been using indexPath.item. I didn’t see any bad behavior, but should use the right property for the job!

Reference:

NSIndexPath UIKit Additions (Web)