发布于:2013-02-22 10:56阅读数:258
软件类型:国产软件 界面语言:简体中文 文件类型:.zip 软件等级:★★★☆☆ 官方网址:http:// 下载次数: | 授权方式:共享软件 软件大小:未知 运行环境:Mac OS X 发布时间:2013-02-22 演示网址:http:// |
软件介绍
来自会员sunzhe的分享:
import <AudioToolbox/AudioToolbox.h>
#import <UIKit/UIKit.h>
- (void)vibrate {
AudioServicesPlaySystemSound(SystemSoundID);
}
当参数为:kSystemSoundID_Vibrate 时就是震动;
ps(只有iphone才能震动而且还得在设置里开启震动才行,其他的如touch就没有震动功能,别忘了导入AudioToolbox框架)。当参数为 1000-2000 之间数字时就是播放系统声音。
系统声音对照表:
There are some predefined system sounds, for the system sound ID in the range 1000 to 2000 (decimal), as shown below (from 2.0 to 5.0 beta). The system sounds are all stored in /System/Library/Audio/UISounds/.
附件:Systemsound demo
playSystemsound.zip (71 K)
![](http://cc.cocimg.com/bbs/images/wind/file/zip.gif)