2017-02-03 7 views
0

`setSession() UIApplication.shared.beginReceivingRemoteControlEvents() becomeFirstResponder()AVAudionセッション中断

NotificationCenter.defaultCenter.addObserver(self, Selector("handleInterruption"), name: AVAudioSessionInterruptionNotification, object: nil) 
     //the Error is the line above this comment 

    player = Player() 

    player.playStream(fileUrl: "http:wwwwww.mp3") 

     updatePlayButton()` 

イム電話はAVAudiointerruptionNotificationを使用して終了したときにチェックしようとしているが、私は私何か間違ったことをやっています引数ラベル_、_、名前、オブジェクトが使用可能なオーバーロードと一致しない場合...

+0

イム電話をAVAudiointerruptionNotificationを使用して終了したときにチェックしようとしているが、私は、私は、引数ラベル_、_、名前は、オブジェクトが使用可能な任意のオーバーロードと一致しないを得続ける何か間違ったことをやっています... – user3625689

答えて

0

速報3で通知センターを使用する新しい方法は、私はエラーや警告なしでコンパイルすることができました!

NotificationCenter.default.addObserver(self, selector: 
    (Selector("handleInterruption")), name: 
    NSNotification.Name.AVAudioSessionInterruption, object: nil) 
関連する問題