这是我在 JSQSystemSoundPlayer 中构建失败的地方。我无法解决这个问题。
if (asAlert) {
[[JSQSystemSoundPlayer sharedPlayer] playAlertSoundWithFilename:fileName fileExtension:kJSQSystemSoundTypeAIFF];
}
else {
[[JSQSystemSoundPlayer sharedPlayer] playSoundWithFilename:fileName fileExtension:kJSQSystemSoundTypeAIFF];
}
最佳答案
根据头文件,我认为您需要包含一个完成 block (如果您不想做任何事情,可以将其设置为 nil
)。
if (asAlert) {
[[JSQSystemSoundPlayer sharedPlayer] playAlertSoundWithFilename:fileName fileExtension:kJSQSystemSoundTypeAIFF completion:nil];
} else {
[[JSQSystemSoundPlayer sharedPlayer] playSoundWithFilename:fileName fileExtension:kJSQSystemSoundTypeAIFF completion:nil];
}
关于ios - 'JSQSystemSoundPlayer' 没有可见的@interface 声明选择器 'playSoundWithFilename:fileExtension:',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32477117/