[英]Capture picture on volume up custom camera overlay ios
I am doing an app which take pictures and uploads to server. 我正在做一个拍照并上传到服务器的应用程序。 I am using custom camera overlay, I am showing it using 我正在使用自定义摄像头叠加层,正在使用
[self presentModalViewController:self.picker animated:NO];
I want to capture picture on pressing volume key up also. 我也想在按下音量键的同时拍摄照片。 I tried this code but no benefit 我尝试了这段代码,但没有任何好处
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(takePicture:)name:@"AVSystemController_SystemVolumeDidChangeNotification" object:nil];
Kindly help me. 请帮助我。 Thanks in advance. 提前致谢。
There is a drop in library that you can use found on Github here: https://github.com/blladnar/RBVolumeButtons 您可以在Github上找到可使用的库,网址为: https : //github.com/blladnar/RBVolumeButtons
If you want to roll your own see the accepted answer here (where I got the previous link): Detect iPhone Volume Button Up Press? 如果您想自己动手,请在此处(我在上一个链接的位置)看到已接受的答案: 检测iPhone音量按钮向上按?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.