繁体   English   中英

'JSQSystemSoundPlayer'的可见@interface没有声明选择器'playSoundWithFilename:fileExtension:'

[英]No visible @interface for 'JSQSystemSoundPlayer' declares the selector 'playSoundWithFilename:fileExtension:'

这是我在JSQSystemSoundPlayer中构建失败的地方。 我无法解决这个问题。

if (asAlert) {
    [[JSQSystemSoundPlayer sharedPlayer] playAlertSoundWithFilename:fileName fileExtension:kJSQSystemSoundTypeAIFF];

}
else {
    [[JSQSystemSoundPlayer sharedPlayer] playSoundWithFilename:fileName fileExtension:kJSQSystemSoundTypeAIFF];
}

根据头文件,我认为您需要包括一个完成块(如果您不想做任何事情,可以将其设置为nil )。

if (asAlert) {
    [[JSQSystemSoundPlayer sharedPlayer] playAlertSoundWithFilename:fileName fileExtension:kJSQSystemSoundTypeAIFF completion:nil];

} else {
    [[JSQSystemSoundPlayer sharedPlayer] playSoundWithFilename:fileName fileExtension:kJSQSystemSoundTypeAIFF completion:nil];
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM