通过SDK覆盖iPhone快门声音 [英] Overriding iPhone shutter sound through SDK

查看:116
本文介绍了通过SDK覆盖iPhone快门声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的iPhone应用程序中,我使用UIImagePickerController和源类型UIImagePickerControllerSourceTypeCamera。当用户拍摄照片时,手机播放熟悉的照相机快门声音。如何替换我自己的自定义声音?我知道这是可能的,因为我已经看到其他应用程序从App Store做它(例如红色激光)。

In my iPhone app, I am using the UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera. When the user takes a picture, the phone plays the familiar camera shutter sound. How can I replace this with my own custom sound? I know it's possible because I've seen other apps from the App Store do it (e.g. Red Laser).

推荐答案

相当肯定这是不可能的。 AFAIK,红色激光实际上不是一个正常的图片,但使用 UIGetScreenImage()(无证,但允许App Store应用程序),以制作实时视频的屏幕截图饲料。由于操作系统在这种情况下不播放声音,他们可以自由发挥自己的声音。

I am quite certain it's not possible. AFAIK, Red Laser doesn't actually take a "normal" picture but uses UIGetScreenImage() (undocumented but nevertheless allowed for App Store apps) to make a screenshot of the live video feed. Since the OS does not play sound on this occasion, they are free to play their own sound.

编辑澄清:从OS 3.1,你可以自由替换标准相机接口与您自己的控制。因此,您可以在屏幕上放置自己的快门按钮,并在用户点击它时播放自己的声音,但AFAIK现在可以摆脱操作系统的标准快门声音。

Edit for clarification: As of OS 3.1, you are free to substitute the standard camera interface with your own controls. So you could place your own shutter button on the screen and play your own sound when the user taps it, but AFAIK there is now way to get rid of the OS's standard shutter sound.

这篇关于通过SDK覆盖iPhone快门声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆