You need to use UIScrollView and with a bunch of UIImageViews or UIButtons(with image as background image). this code uses Buttons on scroll view. Also u wud need a function to generate thumbnails, unless ur using the asset library in which case the function is already there.
[scrollview setContentSize:CGSizeMake(320, (items*itemWidth)];
for (int i = 0; i < [items count]; i++) {
if (i % 4 == 0) {
y+=1;
x = 0;
}
UIButton *myButton = [UIButton buttonWithType:UIButtonTypeCustom];
[myButton setBackgroundImage:[UIImage imageWithCGImage:[items objectAtIndex:i]] forState:UIControlStateNormal];
CGRect rect2 = myButton.frame;
rect2.size.height = kScrollObjHeight2;
rect2.size.width = kScrollObjWidth2;
rect2.origin.y = 10 + (y * 70) + (y *5);
rect2.origin.x = 8 + (x * kScrollObjWidth2) + (x *8);
myButton.frame = rect2;
myButton.tag = i; // tag our images for later use when we place them in serial fashion
x = x + 1;
[myButton addTarget:self action:@selector(clickFunction:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:myButton];
[scrollview addSubview:myButton];
}
};
[scrollview setBackgroundColor:[UIColor blackColor]];
[scrollview setCanCancelContentTouches:NO];
scrollview.indicatorStyle = UIScrollViewIndicatorStyleWhite;
scrollview.clipsToBounds = YES; // default is NO, we want to restrict drawing within our scrollview
scrollview.scrollEnabled = YES;
scrollview.pagingEnabled = YES;