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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-18-2009, 03:18 PM   #6 (permalink)
orchiss
New Member
 
Join Date: Mar 2009
Posts: 3
orchiss is on a distinguished road
Default

perhaps something along the lines of:
Code:
// store the colors 
/* 
   say red=1 
   blue = 2, etc
*/
NSArray *colors = [NSArray arrayWithObjects: @"red",@"blue",@"green",@"orange",@"purple",@"white",nil];

your loop
NSString *name = [colors objectAtIndex: value from brickLayout ];
// create the name based on the index and the colors array
NSString *imgName = [NSString stringWithFormat: @"%@%d.png",name,your_array_index];
// assign your image
UIImage *img = [UIImage imageNamed:imgName];
end loop
Mike
orchiss is offline   Reply With Quote
 

» Advertisements
» Online Users: 475
17 members and 458 guests
baja_yu, BumChinBooth, ChrisYates, dbramhall, fiftysixty, GHuebner, iLearnColors, iOS.Lover, jeroenkeij, josephsan, mer10, Music Man, poke, PowerGoofy, Raffaello, themartist, WeaselPig
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,626
Threads: 94,087
Posts: 402,798
Top Poster: BrianSlick (7,990)
Welcome to our newest member, josephsan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:33 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.