Well if you can get the value of each brick (using similar code to your x and y values (i%8, i/8)) You could use a switch statement to create the correct imaged brick. I don't know how exactly the code would look since I haven't used switch statements in Obj-C yet. So basically you need to do two things.
a) get the correct value for that brick (some people would use two for loops to do the same thing you are doing with just one)
b) use that value to assign the image to the view.
|