Skip to content

Instantly share code, notes, and snippets.

@elight
Created July 28, 2010 19:52
Show Gist options
  • Save elight/496015 to your computer and use it in GitHub Desktop.
Save elight/496015 to your computer and use it in GitHub Desktop.
for(rowNum = 0; projectNum < [tracker.projects count]; rowNum++) {
for(NSUInteger colNum = 0; colNum < numCols; colNum++) {
NSLog(@"projectNum: %d", projectNum);
if (projectNum >= [tracker.projects count]) {
break;
}
project = [tracker.projects objectAtIndex:projectNum];
NSLog(@"Got project %@", project.name);
x = (colNum+1) * PROJECT_COL_MARGIN + colNum * PROJECT_CARD_WIDTH;
y = (rowNum+1) * PROJECT_ROW_MARGIN + rowNum * PROJECT_CARD_HEIGHT;
[self createProjectCardAtX:x y:y forProject:project];
projectNum++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment