ios - No visible @interface for 'JSQSystemSoundPlayer' error -
i added files:
jsqsystemsoundplayer.h jsqsystemsoundplayer.m
into project , rose next error:
no visible @interface 'jsqsystemsoundplayer' declares selector 'playalertsoundwithfilename:fileextension:'
i searched lot could'n find solution. can know how solve it?
this declaration of method
- (void)playalertsoundwithfilename:(nsstring *)filename fileextension:(nsstring *)fileextension completion:(nullable jsqsystemsoundplayercompletionblock)completionblock;
you're missing completion block, there no such method 2 parameters
here example how use it
[[jsqsystemsoundplayer sharedplayer] playsoundwithfilename:@"mysoundfile" fileextension:kjsqsystemsoundtypeaif completion:^{ // completion block code }];
edit: per comments
if @ declaration of playsoundwithfilename: fileextension: completion:
method find
@param completionblock block called after sound has stopped playing.
which means whatever want after sound has stopped playing. if don't want either can pass nil
or empty block above
Comments
Post a Comment