I have a custom UICollectionViewCell
, and I dequeue it from my view controller by registering it like so
[self.calendarView registerNib:[UINib nibWithNibName:NSStringFromClass([DayCell class]) bundle:nil] forCellWithReuseIdentifier:dayCell];
and then dequeueing like so
cell = [collectionView dequeueReusableCellWithReuseIdentifier:dayCell forIndexPath:indexPath];
My question is, which UICollectionViewCell
init method would allow me to access the cell's reuseIdentifier
? Both awakeFromNib
and initWithCoder:
methods get called, however, both log (null)
for self.reuseIdentifier
.
This is a problem, because I want to use the same UICollectionViewCell
class but with different reuseIdentifier
s to achieve slightly differently looking cells, and I want to perform the styling once upon init. For instance, a cell with dayCellDisabled
reuseIdentifier
would have a label of lighter colour.