help need to start developing simple jigsaw puzzle game
<p>i am doing a simple  game like puzzle.</p>

<p>for that there is 9-patch image in android.</p>

<p>similarly is there is any facility in iphone.</p>

<p>i am doing manually  for this as fallows.</p>

<pre><code> UIImage* whole = [UIImage imageNamed:@"bull.jpg"]; //I know this image is 300x300

     int partId = 0;
     for (int x=0; x&lt;=200; x+=100) {
         for(int y=0; y&lt;=200; y+=100) {
             CGImageRef cgImg = CGImageCreateWithImageInRect(whole.CGImage, CGRectMake(x, y, 100, 100));
             UIImage* part = [UIImage imageWithCGImage:cgImg];
            if (partId == 0 ) {
                photo.image = part;

            }
             if (partId == 1 ) {
                 photo1.image = part;

             }
             if (partId == 2 ) {
                 photo2.image = part;

             }
             if (partId == 3 ) {
                 photo3.image = part;

             }
             if (partId == 4 ) {
                 photo4.image = part;

             }
             if (partId == 5 ) {
                 photo5.image = part;

             }
             if (partId == 6 ) {
                 photo6.image = part;

             }
             if (partId == 7 ) {
                 photo7.image = part;

             }
             if (partId == 8 ) {
                 photo8.image = part;

             }



             partId++;
         }
     }
</code></pre>

<p>here photo,photo1,...,photo8 are image views
 but this is not good.</p>

<p>while dragging images one images comes under the another images.</p>

<p>can any one please suggest better way to start my puzzle game.</p>

<p>Thank u in advance. </p>
