Created
February 2, 2012 21:34
-
-
Save colinhumber/1725914 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (GMGridViewCell *)GMGridView:(GMGridView *)gridView cellForItemAtIndex:(NSInteger)index { | |
CGSize size = [self sizeForItemsInGMGridView:gridView]; | |
GMGridViewCell *cell = [gridView dequeueReusableCell]; | |
if (!cell) { | |
cell = [[GMGridViewCell alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)]; | |
} | |
Piece *piece = [self.project.pieces objectAtIndex:index]; | |
PieceView *pieceView = [[PieceView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height) piece:piece]; | |
pieceView.captionVisible = self.showCaption; | |
cell.contentView = pieceView; | |
return cell; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment