title: space between images in thumbnail for ipad
body: <p>I create Thumbnail photo with scrollview for ipad, here is the code:</p>
  
  <pre><code>// load all the images from bundle and add them to the scroll view
  NSUInteger i;
  for (i = 1; i &lt;= kNumImages; i++)
  {
      NSString *imageName = [NSString stringWithFormat:@"image%d.jpg", i];
      UIImage *image = [UIImage imageNamed:imageName];
      UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
  
  
  }
  
  
  
   - (void)layoutScrollImages
  {
  UIImageView *view = nil;
  NSArray *subviews = [scrollView1 subviews];
  
  // reposition all image subviews in a horizontal serial fashion
  CGFloat curXLoc = 0;
  for (view in subviews)
  {
      if ([view isKindOfClass:[UIImageView class]] &amp;&amp; view.tag &gt; 0)
      {
          CGRect frame = view.frame;
          frame.origin = CGPointMake(curXLoc, 0);
          view.frame = frame;
  
          curXLoc += (kScrollObjWidth);
      }
  }
  
  }
  </code></pre>
  
  <p>rightnow I have all images in UIScrollView that they are next to each other, I want to have some space between each images like this picture </p>
  
  <p><img src="https://i.stack.imgur.com/6GZcO.png" alt="enter image description here"></p>
  
  <p>would you please give me some hint that how can I add space between these images?</p>
  
  <p>Thanks in Advance!</p>