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

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

问题描述

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

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,Red Laser 实际上并没有拍摄正常"照片,而是使用 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天全站免登陆