开发者

How to remove vibrate effect from the iphone device

开发者 https://www.devze.com 2022-12-12 06:35 出处:网络
I am implem开发者_如何学Goenting chat application.I have implemented vibrate effect when user get bips.but i want to remove vibrate effect and implement sound effect.how it is possible?You\'ll need to

I am implem开发者_如何学Goenting chat application.I have implemented vibrate effect when user get bips.but i want to remove vibrate effect and implement sound effect.how it is possible?


You'll need to load a sound file:

dingSoundFileURLRef = CFBundleCopyResourceURL( mainBundle,
                                              CFSTR ( "ding" ),
                                              CFSTR ( "caf" ),
                                              NULL
                                              );
AudioServicesCreateSystemSoundID( dingSoundFileURLRef, &dingSoundFileObject );

then play it:

AudioServicesPlaySystemSound( self.dingSoundFileObject );
0

精彩评论

暂无评论...
验证码 换一张
取 消