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

时间:2015-09-09 10:28:44

标签: ios swift jsqmessagesviewcontroller

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

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

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

1 个答案:

答案 0 :(得分:2)

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

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

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