自定义“使用”,“取消”,“重录”和“反相机”按钮事件使用UIImagePickerController [英] Custom "Use", "Cancel",“Retake” and "Reverse Camera" button event using UIImagePickerController
本文介绍了自定义“使用”,“取消”,“重录”和“反相机”按钮事件使用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;
所以,我需要实现自定义按钮选项,任何人都可以告诉我,事件使用UIImagePickerController?
So, I need to implement custom button option, Can anyone please tell me how can i give customize button event using UIImagePickerController?
提前感谢。
推荐答案
构建一个UIViewController,将它的视图作为图像选择器的overlayView。
所有自定义按钮都由此UIViewController控制。
You can build a UIViewController, take it's view as the image picker's overlayView. All your custom buttons are controlled by this UIViewController.
例如
UIButton *myBtn = [[UIButton alloc] initWithFrame:btnFrame];
[myBtn addTarget:self action:@selector(myBtnPressed) forControlEvents:UIControlEventTouchUpInside];
[overlayView addSubview:myBtn];
这篇关于自定义“使用”,“取消”,“重录”和“反相机”按钮事件使用UIImagePickerController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文