简体   繁体   English

使用UIImagePickerController自定义“使用”,“取消”,“重拍”和“倒车”按钮事件

[英]Custom “Use”, “Cancel”,“Retake” and “Reverse Camera” button event using UIImagePickerController

I am making a custom photo picker. 我正在制作自定义照片选择器。 so i have used 所以我用过

imagePickerController.showsCameraControls = NO;

And i have created one camera overlay view and use 我创建了一个相机叠加视图并使用

imagePickerController.cameraOverlayView = overlayView;

So, I need to implement custom button option, Can anyone please tell me how can i give customize button event using UIImagePickerController? 因此,我需要实现自定义按钮选项,有人可以告诉我如何使用UIImagePickerController给出自定义按钮事件吗?

Thanks in advance. 提前致谢。

You can build a UIViewController, take it's view as the image picker's overlayView. 您可以构建一个UIViewController,将其视图作为图像选择器的overlayView。 All your custom buttons are controlled by this UIViewController. 您所有的自定义按钮都由此UIViewController控制。

eg 例如

UIButton *myBtn = [[UIButton alloc] initWithFrame:btnFrame];

[myBtn addTarget:self action:@selector(myBtnPressed) forControlEvents:UIControlEventTouchUpInside];

[overlayView addSubview:myBtn];

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UIImagePickerController - 自定义叠加(Swift)上的重新启动按钮 - UIImagePickerController - Retake button on custom Overlay (Swift) 替换拍摄并重新拍摄按钮UIImagePickerController - Replace shoot and retake button UIImagePickerController Swift:如何更改UIImagePickerController的“使用照片”,“取消”,“拍摄”,“重拍”按钮的默认行为 - Swift: how to change default behaviour of buttons “Use Photo”, “Cancel”, “Shoot”, “Retake” of UIImagePickerController 是否可以更改UIImagePickerController ..即(取消,使用,重拍等)的UIButton的动作? - is it possible to change the actions of the UIButtons for the UIImagePickerController.. i.e.(cancel, use, retake..etc…)? UIImagePickerController在UpperCase Letters“USE_PHOTO”,“RETAKE”和Gallery Images“CAMERA_ROLL”中显示文本? - UIImagePickerController shows text in UpperCase Letters “USE_PHOTO” , “RETAKE” and Gallery Images “CAMERA_ROLL”? 禁用重拍,播放和使用视频屏幕UIImagePickerController - Disable the retake, play and use video screen UIImagePickerController 带有覆盖的iOS 7 UIImagePickerController - 重新拍摄并使用不可用的照片 - iOS 7 UIImagePickerController with Overlay - retake and use photo not usable 为什么Camera API仅使用英语? (“取消”,“自动”,“重新拍摄”,“使用”按钮;以及“移动和缩放”标签。) - Why is the Camera API only in English? (The “Cancel”, “Auto”, “Retake”, “Use” buttons; and “Move and Scale” label.) 在 UIImagePickerController 中,取消按钮未显示? - In UIImagePickerController Cancel button not showing? 相机“重拍”和“使用照片”按钮不起作用 - Camera " Retake " and " Use photo " buttons not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM