答案 0 :(得分:0)
在我的UIImagePickerController中,首先不显示方块,但是当我点击屏幕时,它会在那时显示。
答案 1 :(得分:0)
下载上面的图片(请设计师给你更好的图像)并添加到你的项目中。
在创建imagepicker时添加此代码
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(createAutoFocus)];
[overlayView addGestureRecognizer:tap];//overlayview is your custom overlay
然后在您的课程中添加此方法
-(void)createAutoFocus{
// NSLog(@"click");
CGPoint touchPoint=[recognizer locationInView:overlayView];//overlayview is your custom overlay
// NSLog(@"%@", NSStringFromCGPoint(touchPoint));
UIImageView *imgViewFocus = [[UIImageView alloc] initWithFrame:CGRectMake(touchPoint.x, touchPoint.y, 80, 80)];
imgViewFocus.image = [UIImage imageNamed:@"focus.png"];
imgViewFocus.alpha = 0.8;
[overlayView addSubview:imgViewFocus];
[imagePickerCustom setCameraOverlayView:overlayView];//your customimagepicker
[imgViewFocus performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.5];
}
如果您有任何问题,请告诉我。