开发者

Using SystemSoundID throughout my app?

Can someone please point me in the right direction... I need to use the same sound (a button press) throughout all view controllers in my app. What is the best way to do this. I have managed to load and play a sound in a single view controller but cannot manage to pass a sound to different viewcontrollers because SystemSoundID is not an object and so I cannot use it as a property?? Can someone please help as this is driving me crazy and Im sure its 开发者_StackOverflow中文版something simple that Im missing!!


You can define the property like this:

@property (assign) SystemSoundID clickSound;

Then when you create your view controller, you can set it thusly:

viewController.clickSound = aSoundID;

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜