Q:

how add image with scroll view instead of uibutton in scrolling view?

In this code I want to do changes like as instead of button I want to create images in image view with scroll view with zoom in and zoom out event on image. And two or three button on every image view so that I can implement some event on button. How do that?
- (void)loadView {
         [super loadView];
         self.view.backgroundColor = [UIColor redColor];

         UIScrollView *scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0,        self.view.frame.size.width, self.view.frame.size.height)];
         scroll.pagingEnabled = YES;

        NSInteger numberOfViews = 33;
        [btnMenu setTag:0 ];
        for (int i = 1; i < numberOfViews; i++) {
            CGFloat yOrigin = i * self.view.frame.size.width;
            UIView *awesomeView = [[UIView alloc] initWithFrame:CGRectMake(yOrigin, 0, self.view.frame.size.width, self.view.frame.size.height)];
            //awesomeView.backgroundColor = [UIColor colorWithRed:0.5/i green:0.5 blue:0.5 alpha:1];
            btnMenu = [UIButton buttonWithType:UIButtonTypeCustom];
            //NSData *data =UIImageJPEGRepresentation(, 1);
            [btnMenu setBackgroundImage:[UIImage imageNamed:[NSString stringWithFormat:@"page-%d.jpg",i]] forState:UIControlStateNormal];

            CGRect frame = btnMenu.frame;
            frame.size.width=320;
            frame.size.height=460;
            frame.origin.x=0;
            frame.origin.y=0;
            btnMenu.frame=frame;

            [btnMenu setTag:i];
            btnMenu.alpha = 1;

            [btnMenu addTarget:self action:@selector(btnSelected:) forControlEvents:UIControlEventTouchUpInside];
            [awesomeView addSubview:btnMenu];

            [scroll addSubview:awesomeView];
            [awesomeView release];
         }
         scroll.contentSize = CGSizeMake(self.view.frame.size.width * numberOfViews,   self.view.frame.size.height);
         [self.view addSubview:scroll];
         [scroll release];
}

-(IBAction)btnSelected:(id)sender{
    UIButton *button = (UIButton *)sender;
    int whichButton = button.tag;
    NSLog(@"Current TAG: %i", whichButton);
    if(whichButton==1)
    {
        first=[[FirstImage alloc]init];
        [self.navigationController pushViewController:first animated:YES];
    }

}

A:

You need Image instead of Button right? Then Try This:
    scroll=[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
    scroll.backgroundColor=[UIColor clearColor];
    scroll.pagingEnabled=YES;
    scroll.contentSize = CGSizeMake(320*33, 300);
    CGFloat x=0;
    for(int i=1;i<34;i++)
    {        
        UIImageView *image = [[UIImageView alloc] initWithFrame:CGRectMake(x+0, 0, 320, 460)];
        [image setImage:[UIImage imageNamed:[NSString stringWithFormat:@"page-%d.jpg",i]]];
        [scroll addSubview:image];
        [image release];
        x+=320;
    }
    [self.view addSubview:scroll];
    scroll.showsHorizontalScrollIndicator=NO;
    [scroll release];

