ios 震动

声音可以工作在模拟器,然后一些声音(如循环的)已被证明不能工作,设置在模拟器中成功与否取决于音频格式.注:必须使用.wav格式在这个例子中.
SystemSoundID pmph;
id sndpath = [[NSBundle mainBundle]
    pathForResource:@"mySound"
    ofType:@"wav"
    inDirectory:@"/"];
CFURLRef baseURL = (CFURLRef) [[NSURL alloc] initFileURLWithPath:sndpath];
AudioServicesCreateSystemSoundID (baseURL, &pmph);
AudioServicesPlaySystemSound(pmph);   
[baseURL release];
 
http://blog.sina.com.cn/s/blog_a250468201010ei3.html
 
http://blog.csdn.net/like7xiaoben/article/details/9001806
 
http://blog.csdn.net/like7xiaoben/article/details/8990730
 
http://www.cnblogs.com/wendingding/p/3900112.html

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。