Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-14-2010, 10:34 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 6
Cool 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.
evmacdev is offline   Reply With Quote
Reply

Bookmarks

Tags
game development, grid, iphone, touch screen, xcode

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 263
17 members and 246 guests
ADY, Alsahir, dacapo, Dani77, Desert Diva, djohnson, F_Bryant, Grinarn, HemiMG, jansan, linkmx, M@realobjects, macquitzon216, prchn4christ, smethorst, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:48 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0