开发者

How to remove vibrate effect from the iphone device

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜