开发者

iOS Sdk Adding Audio to a button on iPad?

开发者 https://www.devze.com 2023-03-02 11:13 出处:网络
My biggest problem at the moment: I have tried for days to add a sound to a button for my newest iPad App but it seems to be a different procedure than iphone. There ar开发者_如何学Goe hardly any tuto

My biggest problem at the moment: I have tried for days to add a sound to a button for my newest iPad App but it seems to be a different procedure than iphone. There ar开发者_如何学Goe hardly any tutorials on how to do this? Any clues? Sample code I can borrow?

Please let me know. Thanks!


Cocos2D has a very good audio engine called CocosDenshion that you can import, then it's as simple as....

[[SimpleAudioEngine sharedEngine] playSoundEffect:@"soundEffect.caf"]

In your buttonPressed: method.

0

精彩评论

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