系统提示音的使用
2015-10-21 10:45
246 查看
1.1系统提示音创建
2.1 震动提示
<span style="white-space:pre"></span><p style="margin-top: 0px; margin-bottom: 0px; font-size: 18px;"><span style="font-family:KaiTi_GB2312;"><span style="color: rgb(112, 61, 170);">SystemSoundID</span> receiveSound;</span></p>
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"receive_msg" ofType:@"caf"]; NSURL *soundURL = [NSURL fileURLWithPath:soundPath]; OSStatus err = AudioServicesCreateSystemSoundID((__bridge CFURLRef)soundURL, &receiveSound);1.2 系统提示音播放
//播放声音 AudioServicesPlaySystemSound(receiveSound);
2.1 震动提示
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
相关文章推荐
- CAS环境搭建
- 求一条直线通过的最大点数
- cxf发布webservice,使用maven工程
- Logback使用详解
- java类的设计原则
- VIM 常用快捷键
- [Leetcode]ZigZag Conversion 笨方法
- ActiveMQ消息发送
- dos下Java命令环境变量失效
- Android 状态栏背景模糊透明效果实现
- Leetcode笔记(整理中.......)
- maven 整理记录
- iOS中Bitcode的介绍及配置
- 利用netfilter hook开发llinux后门rootkit程序
- 正则 /u ,/i ,/s ,/m
- docker1.9源码分析(五):server分配handler提供服务的流程
- iOS:弹出窗控制器:UIPopoverController
- Step by Step iOS Project In Action - 视图控制器
- c++ List、Vector、Stack、Queue使用
- IOS -UIButton设置边框颜色