在uiimagepickercontroller cameraoverlayview中移动UIImageView

时间:2014-11-26 08:11:14

标签: ios cameraoverlayview

我有带cameraoverlayview的uiimagepickercontroller

在view cameraOverlay中,我有uiimageview。

如何在cameraOverlay中移动和缩放uiimageview。

我的代码

//创建叠加视图

overlayView = [[OverlayView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height+90)];

// important - it needs to be transparent so the camera preview shows through!
overlayView.opaque=NO;
overlayView.backgroundColor=[UIColor clearColor];

// parent view for our overlay
UIView *cameraView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height+90)];
[cameraView setBackgroundColor:[UIColor clearColor]];
[cameraView addSubview:overlayView];

Layer=[[UIImageView alloc]initWithFrame:CGRectMake(150, 100, self.view.frame.size.width-300, self.view.frame.size.height-250)];
Layer.image=[UIImage imageNamed:@"layer.png"];
[Layer setUserInteractionEnabled:YES];
[cameraView addSubview:Layer];
[CameraImagePickerController setCameraOverlayView:cameraView];

[self presentViewController:CameraImagePickerController animated:NO completion:nil];

我想移动并缩放图层

0 个答案:

没有答案