-(void)loadImage{
// Create a scroll view
scrollView = [[uiscrollview alloc] initWithFrame:CGRectMake(0, 0, 320, 390)];
scrollView.delegate = self;
scrollView.bouncesZoom = YES;
scrollView.backgroundColor = [uicolor whitecolor];
CGFloat maximumWidth = 320;
CGFloat totalHeight = 0.0;
UIImage *image = [uiimage imagenamed:@"shopcart_no.png"];
CGRect frame = CGRectMake(0, 0, 320, 390);
imageView = [[uiimageview alloc] initWithFrame:frame];
imageView.image = image;
[imageview setcontentmode:uiviewcontentmodecenter];
// Increment our maximum width & total height
maximumWidth = MAX(maximumWidth, image.size.width);
totalHeight += image.size.height;
scrollView.minimumZoomScale = scrollView.frame.size.width / maximumWidth;
scrollView.maximumZoomScale = 2.0;
[scrollview addsubview:imageview];
[self.view addsubview:scrollview];
}
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
return imageView;
}