Try this code and set size according to your need.
float horizontal = 8.0;
float vertical = 8.0;
int i;
for(i=0; i<[arrayOfThumbImages count]; i++)
{
if((i%2) == 0 && i!=0)
{
horizontal = 8.0;
vertical = vertical + 70.0 + 8.0;
}
buttonImage = [UIButton buttonWithType:UIButtonTypeCustom];
[buttonImage setFrame:CGRectMake(horizontal, vertical, 70.0, 70.0)];
[buttonImage setTag:i];
[buttonImage setBackgroundImage:[arrayOfThumbImages objectAtIndex:i] forState:UIControlStateNormal];
[buttonImage addTarget:self action:@selector(buttonImagePressed:) forControlEvents:UIControlEventTouchUpInside];
buttonImage.layer.cornerRadius = 15;
buttonImage.layer.masksToBounds = YES;
[myScrollView addSubview:buttonImage];
horizontal = horizontal + 70.0 + 8.0;
}