creating a iphone touch grid game
#define CellSize 50
MapCell *cells[5][6];
int numRows = 5;
int numColumns = 6;
int r, c;
for(r=0; r<numRows; r++)
{
for(c=0; c<numColumns; c++)
{
cells[r][c] = [[MapCell alloc] initWithFrame:CGRectMake((c*CellSize), (r*CellSize), CellSize, CellSize)];
}
}
Could someone help please.
After creating the grid,
How would you add an image into each cell block using the touch screen on each cell.
In other words, if i touch cell[1][3] then cell[2][1] (with my finger), how can i add an image into it both cells from my image folder.
|