Move 10 images continuously in the time interval of 5 sec using objective c?
<p>I have some 10 images, I wanted to show 10 images continuously in two way, one by moving the image with user interaction and other way by automatically moving the images in a time interval with out any user interaction. Following code allow me to move images when user touch and moves the image.... but how can i move the images automatically?</p>

<p>{
    scrollView.delegate = self;</p>

<pre><code>[self.scrollView setBackgroundColor:[UIColor blackColor]];
[scrollView setCanCancelContentTouches:NO];

scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
scrollView.clipsToBounds = YES;
scrollView.scrollEnabled = YES;
scrollView.pagingEnabled = YES;

NSUInteger nimages = 0;
CGFloat cx = 0;
for (; ; nimages++) {
    NSString *imageName = [NSString stringWithFormat:@"pimac%d.gif", (nimages + 1)];
    UIImage *image = [UIImage imageNamed:imageName];
    if (image == nil) {
        break;
    }
    UIImageView *imageView = [[UIImageView alloc] initWithImage:image];

    CGRect rect = imageView.frame;
    rect.size.height = image.size.height;
    rect.size.width = image.size.width;
    rect.origin.x = ((scrollView.frame.size.width - image.size.width) / 2) + cx;
    rect.origin.y = ((scrollView.frame.size.height - image.size.height) / 2);

    imageView.frame = rect;

    [scrollView addSubview:imageView];
    [imageView release];

    cx += scrollView.frame.size.width;
}

self.pageControl.numberOfPages = nimages;
[scrollView setContentSize:CGSizeMake(cx, [scrollView bounds].size.height)];
</code></pre>

<p>}</p>
