0

我有带有 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];

我想要移动和缩放图层

4

0 回答 0