iphone UIScrollView缩放_移动开发_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > 移动开发 > iphone UIScrollView缩放

iphone UIScrollView缩放

 2013/8/1 11:10:57  郑文亮  博客园  我要评论(0)
  • 摘要:allImageScrollView=[[UIScrollViewalloc]initWithFrame:CGRectMake(0,0,768,1024)];allImageScrollView.minimumZoomScale=0.3;allImageScrollView.maximumZoomScale=1.0;allImageScrollView.backgroundColor=[UIColorclearColor];allImageScrollView.delegate=self
  • 标签:iphone view

allImageScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 768, 1024)];
allImageScrollView.minimumZoomScale = 0.3;
allImageScrollView.maximumZoomScale = 1.0;
allImageScrollView.backgroundColor = [UIColor clearColor];
allImageScrollView.delegate = self;
[self.view addSubview:allImageScrollView];

mPicStatusesViewController = [[PicStatusesViewController alloc] init];
[allImageScrollView addSubview:mPicStatusesViewController.view];

//UIScrollView Delegete 实现

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView

{
    return mPicStatusesViewController.view; //返回ScrollView上添加的需要缩放的视图
}

- (void)scrollViewDidZoom:(UIScrollView *)scrollView

{
    //缩放操作中被调用
}

- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale

{
    //缩放结束后被调用
  }

 

原文地址:http://ios-iphone.diandian.com/post/2011-09-15/5066984

发表评论
用户名: 匿名