scrollview元素放大缩小操作

-(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
{
    NSInteger thisindex =  scrollView.contentOffset.x/320+1001;
    UIScrollView*thisscr = (UIScrollView*)[scrollView.superview viewWithTag:thisindex];
    
//    thisscr.bounds = CGRectMake(0, 0, 320, 500);
    
    
//    thisscr.frame = CGRectMake(scrollView.contentOffset.x, 0, 320, 500);

//    thisscr.transform = CGAffineTransformTranslate(thisscr.transform, 0, 0);
    
    
//    thisscr.frame = CGRectMake(scrollView.contentOffset.x, 0, 320, 500);

//    UINavigationControllerc
    
    
//    thisscr.contentSize = CGSizeMake(320, 500);
    
//    UIImageView*thisimageview;
    
    
    
    
    
//    for (id imageview in thisscr.subviews) {
//        if ([imageview isKindOfClass:[UIImageView class]]) {
//            thisimageview = imageview;
//            thisimageview.bounds = CGRectMake(0, 0, 320, 500);
//        }
//    }
//    thisscr.transform = CGAffineTransformScale(thisscr.transform, 1, 1);
    
    
    
    
    
//    thisscr.transform = CGAffineTransformTranslate(thisscr.transform, 320, 500);
     thisscr.transform = CGAffineTransformMakeScale(1, 1);

    thisscr.frame = CGRectMake(scrollView.contentOffset.x, 0, 320, 500);
    
    
    
    scrollView.contentSize = CGSizeMake(320*5, 500);

    
    
    
    


}

你可能感兴趣的:(scrollview元素放大缩小操作)