如何检测iPhone是否在振动? [英] How to detect whether iPhone is vibrating or not?

查看:1804
本文介绍了如何检测iPhone是否在振动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个应用程序,只要iPhone振动(接听电话,振动模式下的文本)就可以执行某些操作。无论如何都要检测iPhone是否在振动(即处理振动事件)?谢谢你的帮助!

I want to write an app that does something whenever the iPhone vibrates (receives phone call, text on vibrate mode). Is there anyway to detect whether the iPhone is vibrating (i.e. handle a "vibrate" event)? Thanks for the help!

推荐答案

我不这么认为Apple给了这么大的自由,但你仍然可以在这里寻找关于这个主题的一个很好的讨论检测iPhone的戒指/使用AVAudioPlayer的静音/静音开关不起作用?

Well i don't think so that Apple give so much liberty but still you can look here for a good discussion on this topic Detecting the iPhone's Ring / Silent / Mute switch using AVAudioPlayer not working?

这篇关于如何检测iPhone是否在振动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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