remoteControlReceivedWithEvent not Called in appDelegate

后端 未结 3 510
渐次进展
渐次进展 2020-12-14 07:58

I\'m having problem to control the iPhone controls with my avplayer.

if I put the function

- (void)remoteControlReceivedWithEvent:(UIEvent *)event
         


        
3条回答
  •  一个人的身影
    2020-12-14 08:39

    You can move the function up the responder chain, to UIApplication subclass. This way, it will always be there to catch the event.

    This kind of event is ignored in common UI and controller classes, so it travels up to the bottom of responder chain, where your app delegate and the the application itself reside.

    As noted here, UIApplication's delegate is not part of responder chain (I was wrong here). UIApplication is there, so is root UIWidow, all the views in chain and corresponding UIViewControllers.

提交回复
热议问题