- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.scrollView.contentSize=CGSizeMake(2090, 245);
self.scrollView.contentOffset=CGPointMake(0, 0);
for (int i=0; i<=11; i++)
{
UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(190*i, 0, 190, 245)];
imageView.userInteractionEnabled=YES;
UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapDown:)];
[imageView addGestureRecognizer:tap];
NSString *s=[NSString stringWithFormat:@"%d.png",i];
UIImage *image=[UIImage imageNamed:s];
imageView.image=image;
[self.scrollView addSubview:imageView];
}
}
-(void)tapDown:(UITapGestureRecognizer *)tap
{
UIImageView *imageView=(UIImageView *)tap.view;
self.imageView.image=imageView.image;
}