0
多的UIImageView我在我的應用程序,它包含多個UIImageView的一個UIScrollView。我想輸入/輸出functionality.Code申請擠捏縮放添加的UIImageView到UIScrollView的是以下iPhone:UIScrollView中與放大/縮小效果
self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
[scViewObject setCanCancelContentTouches:NO];
scViewObject.indicatorStyle = UIScrollViewIndicatorStyleWhite;
scViewObject.clipsToBounds = NO; // default is NO, we want to restrict drawing within our scrollview
scViewObject.scrollEnabled = YES;
scViewObject.alwaysBounceHorizontal=YES;
scViewObject.pagingEnabled = YES;
UIView *view = nil;
NSArray *subviews = [scViewObject subviews];
for (view in subviews)
{
[view removeFromSuperview];
}
int left=20;
numberOfViewController=[ListOfImages count];
//NSMutableArray *controllers = [[NSMutableArray alloc] init];
for (unsigned ii = 0; ii < numberOfViewController; ii++)
{
UIImageView *temp=[[UIImageView alloc] init];
temp.contentMode=UIViewContentModeScaleAspectFit;
temp.userInteractionEnabled = YES;
temp.multipleTouchEnabled = YES;
temp.clipsToBounds = YES;
temp.image=[ListOfImages objectAtIndex:ii];
temp.frame=CGRectMake(left, 0, 280, 365);
temp.tag=ii;
[scViewObject addSubview:temp];
left=left+320;
}
[scViewObject setContentSize:CGSizeMake((numberOfViewController * kScrollObjWidth), 365)];
這裏scViewObject是UIScrollView的。請建議我如何能輸入/輸出功能添加變焦