HDMuteSwitch 1.0.1

HDMuteSwitch 1.0.1

测试已测试
Lang语言 Obj-CObjective C
许可 MIT
发布最后发布2016年12月

HeDong1117 维护。



  • 作者
  • HeDong

HDMuteSwitch 是一个检测 iPhone 手机是否静音的工具。

示例


[[HBMuteSwitch shareInstance] detectMuteSwitch:^(BOOL muted) {            
    if (muted) {         
        // 静音                                       
        [[HBMuteSwitch shareInstance] repeatPlaySystemSoundVibrate];        
    } else {                                                         
        [[HBMuteSwitch shareInstance] repeatPlaySystemSoundVibrate];             
        // 播放其他自己定义的声音或者歌曲                                     
    }                                                                   
}];                                                                 

手动导入

通过 Clone 或下载下载 HDMuteSwitch 文件夹内的所有内容。

将 HDMuteSwitch 内的源文件添加(拖放)到您的工程。

导入#import "HDMuteSwitch.h"。

添加 AudioToolbox.framework 依赖库

补充

类似于微信语音通话和语音视频处理逻辑。

如果在使用过程中遇到 BUG,希望你能 Issues 我。如果你有所帮助请 Star。
Twitter : @Bruce_7_Seven
感谢@Rich2k共享的代码和思路。@Rich2k

许可

HDMuteSwitch 在 MIT 许可下发布。有关详细信息,请参阅 LICENSE。