Swift 耳机插拔控制类型转换错误 现象 原因 解决方案 现象 我们判断耳机拔出需要订阅一个AVAudioSession.routeChangeNotification通知 NotificationCenter.default.addObserver(self, selector: #selector(Test.handleRouteChange(notification:)), name