TGRDataSource icon indicating copy to clipboard operation
TGRDataSource copied to clipboard

Support for data sources with heterogeneous cell reuse identifiers

Open rafaelwinter opened this issue 11 years ago • 2 comments
trafficstars

This PR has a solution for the case of an implementation that uses more than one reuse identifier on the data source. This happens when the view is composed by heterogeneous cells.

The idea is to use a block that provides the reuse identifier for a cell on the given index path. There are some handy new initializers for this case, that will take the reuse identifier block instead of a single reuse identifier string.

rafaelwinter avatar May 21 '14 11:05 rafaelwinter

LGTM

:+1: LGTM

VitorRodrigues avatar May 21 '14 16:05 VitorRodrigues

@rafaelwinter Looks good! My only suggestion would be to implement -initWithCellReuseIdentifier:configureCellBlock: using -initWithReuseIdentifierBlock:configureCellBlock: and make the latter the designated initializer.

gonzalezreal avatar May 22 '14 13:05 gonzalezreal