pivotal/PivotalCoreKit — pull request #51 by idoru (2014-03-13 23:32:10+00:00)
Title: Trigger UICollectionViewCell taps via private API

Curious to know what folks think about this approach to -[UICollectionViewCell tap]

It uses a private API on UICollectionView instead of trying to (partially) simulate selection behavior of the real implementation, which is actually quite complex. This will also trigger attached segues, which the previous implementation did not.

Sadly, UITableView has a sister method, _userSelectRowAtPendingSelectionIndexPath:, however using that method yielded a lot of strange EXC_BAD_ACCESS when the spec autoreleasepool drains. It would have made for better consistency in the framework with respect to this change.

Also note: I removed a lot of tests, as it felt like these were now just testing Apple's code. I instead opted to test some nominal outcomes. I'm not sure if this goes far enough, though?