So as far as I know, the "protocol method":
(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
Automatically sets the bounds of the cell I created. This is all fine and dandy for my of the UICollectionViewCells
, but I need one of them to be in a location that I specify. Any pointers in the right direction would be appreciated.
Can I assume you are also using an instance of
UICollectionViewFlowLayout
as your collection view's layout object?If so, the quick and dirty answer is to subclass
UICollectionViewFlowLayout
and override the-layoutAttributesForItemAtIndexPath:
method:You will probably also need to override
-layoutAttributesForElementsInRect:
:Then use your new subclass in place of
UICollectionViewFlowLayout
when you create your collection view.